liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Bring back Registers#values_at

Open isimluk opened this issue 3 years ago • 1 comments

Previously, registers returned from liquid have been plain hashes and thus users of the library were able to call #value_at on the registers.

This ability has been removed by the introduction of Liquid::Registers class.

isimluk avatar Dec 25 '22 21:12 isimluk

Not sure how much this is practical, but you could just delegate missing methods to :static:

def method_missing(method, *args, &block)
  if static.respond_to?(:method)
    static.send(method, *args, &block)
  else
    super
  end
end

ashmaroli avatar Dec 26 '22 17:12 ashmaroli