Class: Nem::Model::MosaicCollection
- Inherits:
-
Object
- Object
- Nem::Model::MosaicCollection
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/nem/model/mosaic_collection.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
Instance Method Summary collapse
- #find_by_fqn(fqn) ⇒ Nem::Model::MosaicAttachment (also: #[])
- #find_by_namespace_id(namespace_id) ⇒ Nem::Model::MosaicCollection
-
#initialize(attachments) ⇒ MosaicCollection
constructor
A new instance of MosaicCollection.
Constructor Details
#initialize(attachments) ⇒ MosaicCollection
Returns a new instance of MosaicCollection.
12 13 14 |
# File 'lib/nem/model/mosaic_collection.rb', line 12 def initialize() @attachments = end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
9 10 11 |
# File 'lib/nem/model/mosaic_collection.rb', line 9 def @attachments end |
Instance Method Details
#find_by_fqn(fqn) ⇒ Nem::Model::MosaicAttachment Also known as: []
18 19 20 |
# File 'lib/nem/model/mosaic_collection.rb', line 18 def find_by_fqn(fqn) .find { |a| a.fqn == fqn } end |
#find_by_namespace_id(namespace_id) ⇒ Nem::Model::MosaicCollection
26 27 28 |
# File 'lib/nem/model/mosaic_collection.rb', line 26 def find_by_namespace_id(namespace_id) self.class.new(.select { |a| a.namespace_id == namespace_id }) end |