Class: HQMF::GenericValueContainer
- Inherits:
-
Object
- Object
- HQMF::GenericValueContainer
- Includes:
- Conversion::Utilities
- Defined in:
- lib/hqmf-model/types.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type, value) ⇒ GenericValueContainer
constructor
A new instance of GenericValueContainer.
- #to_json ⇒ Object
Methods included from Conversion::Utilities
#build_hash, #check_equality, #json_array, #openstruct_to_json
Constructor Details
#initialize(type, value) ⇒ GenericValueContainer
383 384 385 386 |
# File 'lib/hqmf-model/types.rb', line 383 def initialize(type, value) @type = type @value = value end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
381 382 383 |
# File 'lib/hqmf-model/types.rb', line 381 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
381 382 383 |
# File 'lib/hqmf-model/types.rb', line 381 def value @value end |
Class Method Details
.from_json(json) ⇒ Object
388 389 390 391 |
# File 'lib/hqmf-model/types.rb', line 388 def self.from_json(json) json = json.with_indifferent_access HQMF::GenericValueContainer.new(json['type'], json['value']) end |
Instance Method Details
#==(other) ⇒ Object
397 398 399 |
# File 'lib/hqmf-model/types.rb', line 397 def ==(other) check_equality(self,other) end |
#to_json ⇒ Object
393 394 395 |
# File 'lib/hqmf-model/types.rb', line 393 def to_json build_hash(self, [:type, :value]) end |