Class: NerdTown::Guild::MemberCollectionParser::MemberCollection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/nerd_town/guild.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMemberCollection

Returns a new instance of MemberCollection.



78
79
80
# File 'lib/nerd_town/guild.rb', line 78

def initialize
  @collection = []
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



76
77
78
# File 'lib/nerd_town/guild.rb', line 76

def collection
  @collection
end

Instance Method Details

#each(&block) ⇒ Object



82
83
84
85
86
# File 'lib/nerd_town/guild.rb', line 82

def each(&block)
  collection.each do |member|
    block.call(member)
  end
end

#push(member) ⇒ Object



88
89
90
# File 'lib/nerd_town/guild.rb', line 88

def push(member)
  collection.push(member)
end