Class: Shellout::Calendar
- Inherits:
-
Object
- Object
- Shellout::Calendar
- Defined in:
- lib/shellout/calendar.rb
Instance Method Summary collapse
-
#initialize(date = Date.today) ⇒ Calendar
constructor
A new instance of Calendar.
- #print(out = $stdout) ⇒ Object
- #print3(out = $stdout) ⇒ Object
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
#print(out = $stdout) ⇒ Object
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 |