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

- (Troop) initialize

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

- (Object) id

Returns the value of attribute id



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

def id
  @id
end

- (Object) members

Returns the value of attribute members



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

def members
  @members
end

- (Object) name

Returns the value of attribute name



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

def name
  @name
end

- (Object) pages

Returns the value of attribute pages



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

def pages
  @pages
end