class Haora::ListCommand

Public Class Methods

new(workbook) click to toggle source
Calls superclass method Haora::Command::new
# File lib/haora/list.rb, line 19
def initialize(workbook)
  super(workbook)
end
with(workbook) click to toggle source
# File lib/haora/list.rb, line 5
def self.with(workbook)
  ListCommand.new(workbook)
end

Public Instance Methods

execute() click to toggle source
# File lib/haora/list.rb, line 9
def execute
  if week_display?
    WeekRenderer.new.render(week(at: date))
  else
    DayRenderer.new.render(day(at: date))
  end
end

Private Instance Methods

week_display?() click to toggle source
# File lib/haora/list.rb, line 23
def week_display?
  @params[:week]
end