Class: Fountain::Label

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

Overview

Fountain Label

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Label

Returns a new instance of Label.

Parameters:

  • data (Hash)

    Raw label data



14
15
16
# File 'lib/fountain/label.rb', line 14

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

Instance Attribute Details

#raw_dataObject (readonly)

Raw label data



9
10
11
# File 'lib/fountain/label.rb', line 9

def raw_data
  @raw_data
end

Instance Method Details

#completedObject

Completed



24
25
26
# File 'lib/fountain/label.rb', line 24

def completed
  raw_data['completed']
end

#inspectObject



28
29
30
31
32
33
34
35
# File 'lib/fountain/label.rb', line 28

def inspect
  format(
    '#<%<class_name>s:0x%<object_id>p @title="%<title>s">',
    class_name: self.class.name,
    object_id: object_id,
    title: title
  )
end

#titleObject

Label title



19
20
21
# File 'lib/fountain/label.rb', line 19

def title
  raw_data['title']
end