class Representable::Hash::Binding
Public Class Methods
Source
# File lib/representable/hash/binding.rb, line 6 def self.build_for(definition) return Collection.new(definition) if definition.array? new(definition) end
Public Instance Methods
Source
# File lib/representable/hash/binding.rb, line 24 def deserialize_method :from_hash end
Source
# File lib/representable/hash/binding.rb, line 12 def read(hash, as) hash.has_key?(as) ? hash[as] : FragmentNotFound end
Source
# File lib/representable/hash/binding.rb, line 20 def serialize_method :to_hash end
Source
# File lib/representable/hash/binding.rb, line 16 def write(hash, fragment, as) hash[as] = fragment end