Class: Fountain::Stage
- Inherits:
-
Object
- Object
- Fountain::Stage
- Defined in:
- lib/fountain/stage.rb
Overview
Fountain Stage
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Raw stage data.
Instance Method Summary collapse
-
#id ⇒ Object
Stage ID.
-
#initialize(data) ⇒ Stage
constructor
A new instance of Stage.
- #inspect ⇒ Object
-
#title ⇒ Object
Title.
-
#type ⇒ Object
Type.
Constructor Details
#initialize(data) ⇒ Stage
Returns a new instance of Stage.
14 15 16 |
# File 'lib/fountain/stage.rb', line 14 def initialize(data) @raw_data = Util.stringify_hash_keys data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Raw stage data
9 10 11 |
# File 'lib/fountain/stage.rb', line 9 def raw_data @raw_data end |
Instance Method Details
#id ⇒ Object
Stage ID
19 20 21 |
# File 'lib/fountain/stage.rb', line 19 def id raw_data['id'] end |
#inspect ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/fountain/stage.rb', line 33 def inspect format( '#<%<class_name>s:0x%<object_id>p @id="%<id>s" @title="%<title>s">', class_name: self.class.name, object_id: object_id, id: id, title: title ) end |
#title ⇒ Object
Title
24 25 26 |
# File 'lib/fountain/stage.rb', line 24 def title raw_data['title'] end |
#type ⇒ Object
Type
29 30 31 |
# File 'lib/fountain/stage.rb', line 29 def type raw_data['type'] end |