Class: Avrocado::Decoder
- Inherits:
-
Object
- Object
- Avrocado::Decoder
- Defined in:
- lib/avrocado/deserializer.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #decoded ⇒ Object
-
#initialize(message, schema) ⇒ Decoder
constructor
A new instance of Decoder.
Constructor Details
#initialize(message, schema) ⇒ Decoder
Returns a new instance of Decoder.
21 22 23 24 |
# File 'lib/avrocado/deserializer.rb', line 21 def initialize(, schema) @message = @schema = schema end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
19 20 21 |
# File 'lib/avrocado/deserializer.rb', line 19 def @message end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
19 20 21 |
# File 'lib/avrocado/deserializer.rb', line 19 def schema @schema end |
Instance Method Details
#decoded ⇒ Object
26 27 28 |
# File 'lib/avrocado/deserializer.rb', line 26 def decoded JSON.parse reader.read(nil, decoder).to_s end |