class Nem::Model::MosaicCollection

Attributes

attachments[R]

Public Class Methods

new(attachments) click to toggle source

@param [Array] attachments

# File lib/nem/model/mosaic_collection.rb, line 12
def initialize(attachments)
  @attachments = attachments
end

Public Instance Methods

[](fqn)
Alias for: find_by_fqn
find_by_fqn(fqn) click to toggle source

@param [String] fqn @return [Nem::Model::MosaicAttachment]

# File lib/nem/model/mosaic_collection.rb, line 18
def find_by_fqn(fqn)
  attachments.find { |a| a.fqn == fqn }
end
Also aliased as: []
find_by_namespace_id(namespace_id) click to toggle source

@param [String] namespace_id @return [Nem::Model::MosaicCollection]

# File lib/nem/model/mosaic_collection.rb, line 26
def find_by_namespace_id(namespace_id)
  self.class.new(attachments.select { |a| a.namespace_id == namespace_id })
end