Class: RPG::Troop

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/troop.rb,
lib/rpg/troop/page.rb,
lib/rpg/troop/member.rb,
lib/rpg/troop/page/condition.rb

Defined Under Namespace

Classes: Member, Page

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTroop

Returns a new instance of Troop.



3
4
5
6
7
8
# File 'lib/rpg/troop.rb', line 3

def initialize
  @id = 0
  @name = ''
  @members = []
  @pages = [RPG::Troop::Page.new]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/rpg/troop.rb', line 9

def id
  @id
end

#membersObject

Returns the value of attribute members.



11
12
13
# File 'lib/rpg/troop.rb', line 11

def members
  @members
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/rpg/troop.rb', line 10

def name
  @name
end

#pagesObject

Returns the value of attribute pages.



12
13
14
# File 'lib/rpg/troop.rb', line 12

def pages
  @pages
end