Class: Nem::Model::Mosaic
- Inherits:
-
Object
- Object
- Nem::Model::Mosaic
- Extended by:
- Forwardable
- Includes:
- Nem::Mixin::Assignable
- Defined in:
- lib/nem/model/mosaic.rb
Instance Attribute Summary collapse
-
#mosaic_id ⇒ Object
readonly
Returns the value of attribute mosaic_id.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
Class Method Summary collapse
Methods included from Nem::Mixin::Assignable
Instance Attribute Details
#mosaic_id ⇒ Object (readonly)
Returns the value of attribute mosaic_id.
9 10 11 |
# File 'lib/nem/model/mosaic.rb', line 9 def mosaic_id @mosaic_id end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
9 10 11 |
# File 'lib/nem/model/mosaic.rb', line 9 def quantity @quantity end |
Class Method Details
.new_from_mosaic(hash) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/nem/model/mosaic.rb', line 11 def self.new_from_mosaic(hash) mosaic_id = MosaicId.new_from_mosaic_id(hash[:mosaicId]) new( quantity: hash[:quantity], mosaic_id: mosaic_id ) end |