Class: GymFinder::TimeTable::TimeSlot
- Inherits:
-
Object
- Object
- GymFinder::TimeTable::TimeSlot
- Defined in:
- lib/gym_finder/time_table.rb
Instance Attribute Summary collapse
-
#court ⇒ Object
Returns the value of attribute court.
-
#price ⇒ Object
Returns the value of attribute price.
-
#qpid ⇒ Object
Returns the value of attribute qpid.
-
#status ⇒ Object
Returns the value of attribute status.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #==(other_time_slot) ⇒ Object
-
#initialize(**params) ⇒ TimeSlot
constructor
A new instance of TimeSlot.
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
#court ⇒ Object
Returns the value of attribute court.
6 7 8 |
# File 'lib/gym_finder/time_table.rb', line 6 def court @court end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/gym_finder/time_table.rb', line 6 def price @price end |
#qpid ⇒ Object
Returns the value of attribute qpid.
6 7 8 |
# File 'lib/gym_finder/time_table.rb', line 6 def qpid @qpid end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/gym_finder/time_table.rb', line 6 def status @status end |
#time ⇒ Object
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 |