Class: Shellout::Calendar

Inherits:
Object
  • Object
show all
Defined in:
lib/shellout/calendar.rb

Instance Method Summary collapse

Constructor Details

#initialize(date = Date.today) ⇒ Calendar

Returns a new instance of Calendar.



6
7
8
9
# File 'lib/shellout/calendar.rb', line 6

def initialize(date=Date.today)
  @date = date
  @list_of_days = "Mo Tu We Th Fr Sa Su"
end

Instance Method Details



11
12
13
# File 'lib/shellout/calendar.rb', line 11

def print(out=$stdout)
  print_helper(out, Array(@date))
end

#print3(out = $stdout) ⇒ Object



15
16
17
# File 'lib/shellout/calendar.rb', line 15

def print3(out=$stdout)
  print_helper(out, [@date.prev_month, @date, @date.next_month])
end