Skip to content

Instantly share code, notes, and snippets.

@raphink
Last active December 14, 2015 07:08
Show Gist options
  • Save raphink/5047946 to your computer and use it in GitHub Desktop.
Save raphink/5047946 to your computer and use it in GitHub Desktop.
<%=
class MyHash < Hash
def initialize(hash)
@hash = hash
end
def test
@hash.is_a?(Hash) ? "yes" : @hash.class
end
end
myHash = MyHash.new(scope.to_hash)
myHash.test
-%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment