Class: Artisan::Story
- Inherits:
-
Object
- Object
- Artisan::Story
- Defined in:
- lib/artisan/story.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#optimistic ⇒ Object
Returns the value of attribute optimistic.
-
#pessimistic ⇒ Object
Returns the value of attribute pessimistic.
-
#realistic ⇒ Object
Returns the value of attribute realistic.
Instance Method Summary collapse
-
#initialize(story_chunk) ⇒ Story
constructor
A new instance of Story.
Constructor Details
#initialize(story_chunk) ⇒ Story
Returns a new instance of Story.
6 7 8 9 10 11 12 |
# File 'lib/artisan/story.rb', line 6 def initialize story_chunk @name = story_chunk["story"]["name"] @number = story_chunk["story"]["number"] @optimistic = story_chunk["story"]["optimistic"] @realistic = story_chunk["story"]["realistic"] @pessimistic = story_chunk["story"]["pessimistic"] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/artisan/story.rb', line 4 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/artisan/story.rb', line 4 def number @number end |
#optimistic ⇒ Object
Returns the value of attribute optimistic.
4 5 6 |
# File 'lib/artisan/story.rb', line 4 def optimistic @optimistic end |
#pessimistic ⇒ Object
Returns the value of attribute pessimistic.
4 5 6 |
# File 'lib/artisan/story.rb', line 4 def pessimistic @pessimistic end |
#realistic ⇒ Object
Returns the value of attribute realistic.
4 5 6 |
# File 'lib/artisan/story.rb', line 4 def realistic @realistic end |