Class: Representable::JSON::TextBinding

Inherits:
Binding
  • Object
show all
Defined in:
lib/representable/bindings/json_bindings.rb

Overview

Represents plain key-value.

Instance Attribute Summary

Attributes inherited from Binding

#definition

Instance Method Summary collapse

Methods inherited from Binding

#initialize, #read

Constructor Details

This class inherits a constructor from Representable::JSON::Binding

Instance Method Details

#write(hash, value) ⇒ Object



31
32
33
# File 'lib/representable/bindings/json_bindings.rb', line 31

def write(hash, value)
  hash[definition.from] = value
end