Class: Qwe::Proxy::Hash
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_hash(thing, name, hash = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/qwe/proxy/hash.rb', line 13 def self.from_hash(thing, name, hash = {}) if hash.is_a?(Qwe::Proxy::Hash) hash else h = new h.replace(hash) h.__qwe_thing = thing h.__qwe_name = name h end end |
Instance Method Details
#to_rb ⇒ Object
25 26 27 |
# File 'lib/qwe/proxy/hash.rb', line 25 def to_rb "Qwe::Proxy::Hash.from_hash(#{__qwe_thing.to_rb}, :#{__qwe_name}, #{super})" end |