Class: Siilar::Struct::TagCollection

Inherits:
Base
  • Object
show all
Defined in:
lib/siilar/struct/tag_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Siilar::Struct::Base

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/siilar/struct/tag_collection.rb', line 5

def description
  @description
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/siilar/struct/tag_collection.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/siilar/struct/tag_collection.rb', line 5

def name
  @name
end

Instance Method Details

#tagsObject



7
8
9
# File 'lib/siilar/struct/tag_collection.rb', line 7

def tags
  @tags ||= []
end

#tags=(attrs) ⇒ Object



11
12
13
14
15
# File 'lib/siilar/struct/tag_collection.rb', line 11

def tags=(attrs)
  if attrs
    @tags = attrs.map { |tag| Struct::Tag.new(tag) }
  end
end