Class: Nem::Model::MosaicSupply

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/nem/model/mosaic_supply.rb', line 10

def id
  @id
end

#supplyObject (readonly)

Returns the value of attribute supply.



10
11
12
# File 'lib/nem/model/mosaic_supply.rb', line 10

def supply
  @supply
end

Class Method Details

.new_from_mosaic_supply(hash) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/nem/model/mosaic_supply.rb', line 12

def self.new_from_mosaic_supply(hash)
  id = MosaicId.new_from_mosaic_id(hash[:mosaicId])
  new(
    id: id,
    supply: hash[:supply]
  )
end