Class: Fountain::BookedSlot

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

Overview

Fountain Booked Slot

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ BookedSlot

Returns a new instance of BookedSlot.

Parameters:

  • data (Hash)

    Raw booked slot data



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_dataObject (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_timeObject

End time



27
28
29
# File 'lib/fountain/booked_slot.rb', line 27

def end_time
  Time.parse raw_data['end_time']
end

#idObject

Booked slot ID



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

def id
  raw_data['id']
end

#inspectObject



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

#instructionsObject

Instructions



42
43
44
# File 'lib/fountain/booked_slot.rb', line 42

def instructions
  raw_data['instructions']
end

#locationObject

Location



32
33
34
# File 'lib/fountain/booked_slot.rb', line 32

def location
  raw_data['location']
end

#recruiterObject

Recruiter



37
38
39
# File 'lib/fountain/booked_slot.rb', line 37

def recruiter
  raw_data['recruiter']
end

#showed_upObject

Showed up



47
48
49
# File 'lib/fountain/booked_slot.rb', line 47

def showed_up
  raw_data['showed_up'] == 'true'
end

#start_timeObject

Start time



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

def start_time
  Time.parse raw_data['start_time']
end