Class: Builder
- Inherits:
-
Object
- Object
- Builder
- Defined in:
- lib/Builder.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#ancestries ⇒ Object
Returns the value of attribute ancestries.
-
#backgrounds ⇒ Object
Returns the value of attribute backgrounds.
-
#classes ⇒ Object
Returns the value of attribute classes.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#statistics ⇒ Object
Returns the value of attribute statistics.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ Builder
constructor
A new instance of Builder.
- #rewriter ⇒ Object
- #writer ⇒ Object
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
#ancestries ⇒ Object
Returns the value of attribute ancestries.
5 6 7 |
# File 'lib/Builder.rb', line 5 def ancestries @ancestries end |
#backgrounds ⇒ Object
Returns the value of attribute backgrounds.
5 6 7 |
# File 'lib/Builder.rb', line 5 def backgrounds @backgrounds end |
#classes ⇒ Object
Returns the value of attribute classes.
5 6 7 |
# File 'lib/Builder.rb', line 5 def classes @classes end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/Builder.rb', line 5 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/Builder.rb', line 5 def name @name end |
#statistics ⇒ Object
Returns the value of attribute statistics.
5 6 7 |
# File 'lib/Builder.rb', line 5 def statistics @statistics end |
Class Method Details
.all ⇒ Object
37 38 39 |
# File 'lib/Builder.rb', line 37 def self.all @@all end |
Instance Method Details
#rewriter ⇒ Object
31 32 33 34 35 |
# File 'lib/Builder.rb', line 31 def rewriter description.clear end |
#writer ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/Builder.rb', line 23 def writer puts "Tell your tale." description << gets.chomp end |