Class: Fountain::Transition
- Inherits:
-
Object
- Object
- Fountain::Transition
- Defined in:
- lib/fountain/transition.rb
Overview
Fountain Transition
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Raw transition data.
Instance Method Summary collapse
-
#created_at ⇒ Object
Created at.
-
#initialize(data) ⇒ Transition
constructor
A new instance of Transition.
- #inspect ⇒ Object
-
#stage_title ⇒ Object
Stage title.
Constructor Details
#initialize(data) ⇒ Transition
Returns a new instance of Transition.
14 15 16 |
# File 'lib/fountain/transition.rb', line 14 def initialize(data) @raw_data = Util.stringify_hash_keys data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Raw transition data
9 10 11 |
# File 'lib/fountain/transition.rb', line 9 def raw_data @raw_data end |
Instance Method Details
#created_at ⇒ Object
Created at
24 25 26 |
# File 'lib/fountain/transition.rb', line 24 def created_at Time.parse raw_data['created_at'] end |
#inspect ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/fountain/transition.rb', line 28 def inspect format( '#<%<class_name>s:0x%<object_id>p @stage_title="%<title>s">', class_name: self.class.name, object_id: object_id, title: stage_title ) end |
#stage_title ⇒ Object
Stage title
19 20 21 |
# File 'lib/fountain/transition.rb', line 19 def stage_title raw_data['stage_title'] end |