Class: C11n::Conversion::PlainDeserializer
- Inherits:
-
Object
- Object
- C11n::Conversion::PlainDeserializer
- Defined in:
- lib/c11n/conversion/plain_deserializer.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
Returns the value of attribute table.
-
#translations ⇒ Object
readonly
Returns the value of attribute translations.
Instance Method Summary collapse
- #deserialize ⇒ Object
-
#initialize(table) ⇒ PlainDeserializer
constructor
A new instance of PlainDeserializer.
Constructor Details
#initialize(table) ⇒ PlainDeserializer
Returns a new instance of PlainDeserializer.
7 8 9 10 |
# File 'lib/c11n/conversion/plain_deserializer.rb', line 7 def initialize(table) @table = table @translations = {} end |
Instance Attribute Details
#table ⇒ Object
Returns the value of attribute table.
4 5 6 |
# File 'lib/c11n/conversion/plain_deserializer.rb', line 4 def table @table end |
#translations ⇒ Object (readonly)
Returns the value of attribute translations.
5 6 7 |
# File 'lib/c11n/conversion/plain_deserializer.rb', line 5 def translations @translations end |
Instance Method Details
#deserialize ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/c11n/conversion/plain_deserializer.rb', line 12 def deserialize @table.each do |key, value| @translations[key] = value end @translations end |