Class: GymFinder::TimeTable::TimeSlot

Inherits:
Object
  • Object
show all
Defined in:
lib/gym_finder/time_table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**params) ⇒ TimeSlot

Returns a new instance of TimeSlot.



8
9
10
11
12
# File 'lib/gym_finder/time_table.rb', line 8

def initialize(**params)
  params.each do |key, value|
    send("#{key}=", value)
  end
end

Instance Attribute Details

#courtObject

Returns the value of attribute court.



6
7
8
# File 'lib/gym_finder/time_table.rb', line 6

def court
  @court
end

#priceObject

Returns the value of attribute price.



6
7
8
# File 'lib/gym_finder/time_table.rb', line 6

def price
  @price
end

#qpidObject

Returns the value of attribute qpid.



6
7
8
# File 'lib/gym_finder/time_table.rb', line 6

def qpid
  @qpid
end

#statusObject

Returns the value of attribute status.



6
7
8
# File 'lib/gym_finder/time_table.rb', line 6

def status
  @status
end

#timeObject

Returns the value of attribute time.



6
7
8
# File 'lib/gym_finder/time_table.rb', line 6

def time
  @time
end

Instance Method Details

#==(other_time_slot) ⇒ Object



14
15
16
17
18
19
# File 'lib/gym_finder/time_table.rb', line 14

def ==(other_time_slot)
  %i[time court price status qpid].each do |name|
    return false unless send(name) == other_time_slot.send(name)
  end
  true
end