Class: Nem::Model::MosaicId
- Inherits:
-
Object
- Object
- Nem::Model::MosaicId
- Includes:
- Nem::Mixin::Assignable
- Defined in:
- lib/nem/model/mosaic_id.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace_id ⇒ Object
readonly
Returns the value of attribute namespace_id.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Nem::Mixin::Assignable
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/nem/model/mosaic_id.rb', line 6 def name @name end |
#namespace_id ⇒ Object (readonly)
Returns the value of attribute namespace_id.
6 7 8 |
# File 'lib/nem/model/mosaic_id.rb', line 6 def namespace_id @namespace_id end |
Class Method Details
.new_from_mosaic_id(hash) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/nem/model/mosaic_id.rb', line 8 def self.new_from_mosaic_id(hash) new( namespace_id: hash[:namespaceId], name: hash[:name] ) end |
Instance Method Details
#fqn ⇒ Object
15 16 17 |
# File 'lib/nem/model/mosaic_id.rb', line 15 def fqn @fqn ||= "#{@namespace_id}:#{@name}" end |
#to_hash ⇒ Object
19 20 21 22 23 24 |
# File 'lib/nem/model/mosaic_id.rb', line 19 def to_hash { namespaceId: namespace_id, name: name } end |