Class: Nis::Struct::MosaicAttachment

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/nis/struct/mosaic_attachment.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mo_def, quantity) ⇒ MosaicAttachment

Returns a new instance of MosaicAttachment.



11
12
13
14
# File 'lib/nis/struct/mosaic_attachment.rb', line 11

def initialize(mo_def, quantity)
  @mosaic_definition = mo_def
  @quantity = quantity
end

Instance Attribute Details

#fqnString

ex) nem.xem

Returns:

  • (String)

    the current value of fqn



5
6
7
# File 'lib/nis/struct/mosaic_attachment.rb', line 5

def fqn
  @fqn
end

#mosaic_definitionObject (readonly)

Returns the value of attribute mosaic_definition.



9
10
11
# File 'lib/nis/struct/mosaic_attachment.rb', line 9

def mosaic_definition
  @mosaic_definition
end

#quantityInteger

Returns the current value of quantity.

Returns:

  • (Integer)

    the current value of quantity



5
6
7
# File 'lib/nis/struct/mosaic_attachment.rb', line 5

def quantity
  @quantity
end

Instance Method Details

#to_hashObject



16
17
18
19
# File 'lib/nis/struct/mosaic_attachment.rb', line 16

def to_hash
  { mosaicId: @mosaic_definition.id.to_hash,
    quantity: @quantity }
end