Class: Fable::Choice
- Inherits:
-
RuntimeObject
- Object
- RuntimeObject
- Fable::Choice
- Defined in:
- lib/fable/choice.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
The original index into current_choices list on the Story when this choice was generated, for convenience.
-
#invisible_default ⇒ Object
(also: #invisible_default?)
Returns the value of attribute invisible_default.
-
#original_thread_index ⇒ Object
Returns the value of attribute original_thread_index.
-
#source_path ⇒ Object
Get the path to the original choice point - where was this choice defined in the story?.
-
#target_path ⇒ Object
Returns the value of attribute target_path.
-
#text ⇒ Object
The main text presented to the player for this choice.
-
#thread_at_generation ⇒ Object
Returns the value of attribute thread_at_generation.
Attributes inherited from RuntimeObject
#original_object, #own_debug_metadata, #parent, #path
Instance Method Summary collapse
-
#path_string_on_choice ⇒ Object
The target path that the story should be diverted to if the choice is chosen.
- #path_string_on_choice=(value) ⇒ Object
Methods inherited from RuntimeObject
#compact_path_string, #convert_path_to_relative, #copy, #debug_line_number_of_path, #debug_metadata, #indentation_string, #initialize, #resolve_path, #root_content_container
Constructor Details
This class inherits a constructor from Fable::RuntimeObject
Instance Attribute Details
#index ⇒ Object
The original index into current_choices list on the Story when this choice was generated, for convenience
13 14 15 |
# File 'lib/fable/choice.rb', line 13 def index @index end |
#invisible_default ⇒ Object Also known as: invisible_default?
Returns the value of attribute invisible_default.
15 16 17 |
# File 'lib/fable/choice.rb', line 15 def invisible_default @invisible_default end |
#original_thread_index ⇒ Object
Returns the value of attribute original_thread_index.
15 16 17 |
# File 'lib/fable/choice.rb', line 15 def original_thread_index @original_thread_index end |
#source_path ⇒ Object
Get the path to the original choice point - where was this choice defined in the story?
9 10 11 |
# File 'lib/fable/choice.rb', line 9 def source_path @source_path end |
#target_path ⇒ Object
Returns the value of attribute target_path.
15 16 17 |
# File 'lib/fable/choice.rb', line 15 def target_path @target_path end |
#text ⇒ Object
The main text presented to the player for this choice
4 5 6 |
# File 'lib/fable/choice.rb', line 4 def text @text end |
#thread_at_generation ⇒ Object
Returns the value of attribute thread_at_generation.
15 16 17 |
# File 'lib/fable/choice.rb', line 15 def thread_at_generation @thread_at_generation end |
Instance Method Details
#path_string_on_choice ⇒ Object
The target path that the story should be diverted to if the choice is chosen
22 23 24 |
# File 'lib/fable/choice.rb', line 22 def path_string_on_choice return self.target_path.to_s end |