Class: Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/Builder.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Builder

Returns a new instance of Builder.



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/Builder.rb', line 9

def initialize(name)
  @name = name
  @description = ""
  @@all << self
  @statistics = {
    str: 10,
    dex: 10,
    con: 10,
    int: 10,
    wis: 10,
    cha: 10
  }
end

Instance Attribute Details

#ancestriesObject

Returns the value of attribute ancestries.



5
6
7
# File 'lib/Builder.rb', line 5

def ancestries
  @ancestries
end

#backgroundsObject

Returns the value of attribute backgrounds.



5
6
7
# File 'lib/Builder.rb', line 5

def backgrounds
  @backgrounds
end

#classesObject

Returns the value of attribute classes.



5
6
7
# File 'lib/Builder.rb', line 5

def classes
  @classes
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/Builder.rb', line 5

def description
  @description
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/Builder.rb', line 5

def name
  @name
end

#statisticsObject

Returns the value of attribute statistics.



5
6
7
# File 'lib/Builder.rb', line 5

def statistics
  @statistics
end

Class Method Details

.allObject



37
38
39
# File 'lib/Builder.rb', line 37

def self.all
  @@all
end

Instance Method Details

#rewriterObject



31
32
33
34
35
# File 'lib/Builder.rb', line 31

def rewriter
  
  description.clear

end

#writerObject



23
24
25
26
27
28
29
# File 'lib/Builder.rb', line 23

def writer

  puts "Tell your tale."

  description << gets.chomp

end