Class: Fountain::BookedSlot
- Inherits:
-
Object
- Object
- Fountain::BookedSlot
- Defined in:
- lib/fountain/booked_slot.rb
Overview
Fountain Booked Slot
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Raw booked slot data.
Instance Method Summary collapse
-
#end_time ⇒ Object
End time.
-
#id ⇒ Object
Booked slot ID.
-
#initialize(data) ⇒ BookedSlot
constructor
A new instance of BookedSlot.
- #inspect ⇒ Object
-
#instructions ⇒ Object
Instructions.
-
#location ⇒ Object
Location.
-
#recruiter ⇒ Object
Recruiter.
-
#showed_up ⇒ Object
Showed up.
-
#start_time ⇒ Object
Start time.
Constructor Details
#initialize(data) ⇒ BookedSlot
Returns a new instance of BookedSlot.
12 13 14 |
# File 'lib/fountain/booked_slot.rb', line 12 def initialize(data) @raw_data = Util.stringify_hash_keys data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Raw booked slot data
7 8 9 |
# File 'lib/fountain/booked_slot.rb', line 7 def raw_data @raw_data end |
Instance Method Details
#end_time ⇒ Object
End time
27 28 29 |
# File 'lib/fountain/booked_slot.rb', line 27 def end_time Time.parse raw_data['end_time'] end |
#id ⇒ Object
Booked slot ID
17 18 19 |
# File 'lib/fountain/booked_slot.rb', line 17 def id raw_data['id'] end |
#inspect ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/fountain/booked_slot.rb', line 51 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
42 43 44 |
# File 'lib/fountain/booked_slot.rb', line 42 def instructions raw_data['instructions'] end |
#location ⇒ Object
Location
32 33 34 |
# File 'lib/fountain/booked_slot.rb', line 32 def location raw_data['location'] end |
#recruiter ⇒ Object
Recruiter
37 38 39 |
# File 'lib/fountain/booked_slot.rb', line 37 def recruiter raw_data['recruiter'] end |
#showed_up ⇒ Object
Showed up
47 48 49 |
# File 'lib/fountain/booked_slot.rb', line 47 def showed_up raw_data['showed_up'] == 'true' end |
#start_time ⇒ Object
Start time
22 23 24 |
# File 'lib/fountain/booked_slot.rb', line 22 def start_time Time.parse raw_data['start_time'] end |