Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back Registers#values_at #1662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

isimluk
Copy link

@isimluk isimluk commented Dec 25, 2022

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 isimluk reopened this Dec 26, 2022
Previously, registers returned from liquid have been good plain old 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.
@ashmaroli
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants