Class: Fountain::Slot
- Inherits:
-
Object
- Object
- Fountain::Slot
- Defined in:
- lib/fountain/slot.rb
Overview
Fountain Slot
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Raw slot data.
Instance Method Summary collapse
-
#end_time ⇒ Object
End time.
-
#id ⇒ Object
Slot ID.
-
#initialize(data) ⇒ Slot
constructor
A new instance of Slot.
- #inspect ⇒ Object
-
#instructions ⇒ Object
Instructions.
-
#location ⇒ Object
Location.
-
#recruiter ⇒ Object
Recruiter.
-
#showed_up? ⇒ Boolean
Showed up.
-
#start_time ⇒ Object
Start time.
Constructor Details
#initialize(data) ⇒ Slot
Returns a new instance of Slot.
14 15 16 |
# File 'lib/fountain/slot.rb', line 14 def initialize(data) @raw_data = Util.stringify_hash_keys data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Raw slot data
9 10 11 |
# File 'lib/fountain/slot.rb', line 9 def raw_data @raw_data end |
Instance Method Details
#end_time ⇒ Object
End time
29 30 31 |
# File 'lib/fountain/slot.rb', line 29 def end_time Time.parse raw_data['end_time'] end |
#id ⇒ Object
Slot ID
19 20 21 |
# File 'lib/fountain/slot.rb', line 19 def id raw_data['id'] end |
#inspect ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/fountain/slot.rb', line 53 def inspect format( '#<%<class_name>s:0x%<object_id>p @id="%<id>s">', class_name: self.class.name, object_id: object_id, id: id ) end |
#instructions ⇒ Object
Instructions
44 45 46 |
# File 'lib/fountain/slot.rb', line 44 def instructions raw_data['instructions'] end |
#location ⇒ Object
Location
34 35 36 |
# File 'lib/fountain/slot.rb', line 34 def location raw_data['location'] end |
#recruiter ⇒ Object
Recruiter
39 40 41 |
# File 'lib/fountain/slot.rb', line 39 def recruiter raw_data['recruiter'] end |
#showed_up? ⇒ Boolean
Showed up
49 50 51 |
# File 'lib/fountain/slot.rb', line 49 def showed_up? raw_data['showed_up'].to_s == 'true' end |
#start_time ⇒ Object
Start time
24 25 26 |
# File 'lib/fountain/slot.rb', line 24 def start_time Time.parse raw_data['start_time'] end |