Class: Portera::Timeslot

Inherits:
Struct
  • Object
show all
Defined in:
lib/portera/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#participantsObject

Returns the value of attribute participants

Returns:

  • (Object)

    the current value of participants



79
80
81
# File 'lib/portera/event.rb', line 79

def participants
  @participants
end

#rangeObject

Returns the value of attribute range

Returns:

  • (Object)

    the current value of range



79
80
81
# File 'lib/portera/event.rb', line 79

def range
  @range
end

Instance Method Details

#to_sObject

temporary, TODO use views/presenters instead



82
83
84
85
86
# File 'lib/portera/event.rb', line 82

def to_s
  ["#{self.range}",
   self.participants.empty? ? nil : " #{self.participants.to_a.join("\n ")}"
  ].compact.join("\n")
end