Class: Vindetta::Decoder::Result
- Inherits:
-
Object
- Object
- Vindetta::Decoder::Result
- Extended by:
- DSL
- Defined in:
- lib/vindetta/decoder/result.rb
Instance Method Summary collapse
-
#initialize(variables) ⇒ Result
constructor
A new instance of Result.
- #inspect ⇒ Object
- #to_json ⇒ Object
Methods included from DSL
decoded_attributes, extended, has_value
Constructor Details
#initialize(variables) ⇒ Result
Returns a new instance of Result.
23 24 25 |
# File 'lib/vindetta/decoder/result.rb', line 23 def initialize(variables) @variables = variables end |
Instance Method Details
#inspect ⇒ Object
27 28 29 |
# File 'lib/vindetta/decoder/result.rb', line 27 def inspect "#<Vindetta::Decoder::Response:#{"0x00%x" % (object_id << 1)}>" end |
#to_json ⇒ Object
31 32 33 34 35 |
# File 'lib/vindetta/decoder/result.rb', line 31 def to_json self.class.decoded_attributes.map do |a| [a, send(a)] end.to_h end |