Class: Nem::Model::Mosaic

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Nem::Mixin::Assignable
Defined in:
lib/nem/model/mosaic.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#mosaic_idObject (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

#quantityObject (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