Class: Fountain::Stage

Inherits:
Object
  • Object
show all
Defined in:
lib/fountain/stage.rb

Overview

Fountain Stage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Stage



12
13
14
# File 'lib/fountain/stage.rb', line 12

def initialize(data)
  @raw_data = Util.stringify_hash_keys data
end

Instance Attribute Details

#raw_dataObject (readonly)

Raw stage data



7
8
9
# File 'lib/fountain/stage.rb', line 7

def raw_data
  @raw_data
end

Instance Method Details

#idObject

Stage ID



17
18
19
# File 'lib/fountain/stage.rb', line 17

def id
  raw_data['id']
end

#inspectObject



26
27
28
29
30
31
32
33
34
# File 'lib/fountain/stage.rb', line 26

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

#titleObject

Title



22
23
24
# File 'lib/fountain/stage.rb', line 22

def title
  raw_data['title']
end