class GreenButtonData::Parser::Interval

Public Instance Methods

ends_at(kwargs = {}) click to toggle source
# File lib/green-button-data/parser/interval.rb, line 19
def ends_at(kwargs = {})
  epoch_to_time @start + @duration, kwargs
end
starts_at(kwargs = {}) click to toggle source
# File lib/green-button-data/parser/interval.rb, line 15
def starts_at(kwargs = {})
  epoch_to_time @start, kwargs
end
to_s() click to toggle source
# File lib/green-button-data/parser/interval.rb, line 23
def to_s
  "#{starts_at} - #{ends_at}"
end