Class: ClockIndicator::OtherMonthCalendar
- Inherits:
-
Object
- Object
- ClockIndicator::OtherMonthCalendar
- Defined in:
- lib/clock_indicator/other_month_calendar.rb
Direct Known Subclasses
Instance Method Summary collapse
- #calendar ⇒ Object
-
#initialize(i = 1) ⇒ OtherMonthCalendar
constructor
A new instance of OtherMonthCalendar.
Constructor Details
#initialize(i = 1) ⇒ OtherMonthCalendar
Returns a new instance of OtherMonthCalendar.
3 4 5 |
# File 'lib/clock_indicator/other_month_calendar.rb', line 3 def initialize(i = 1) @i = i end |
Instance Method Details
#calendar ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/clock_indicator/other_month_calendar.rb', line 7 def calendar @calendar ||= Gtk::Calendar.new.tap do |c| c. = OTHER_CALENDAR_OPTIONS c.day = 0 c.month = date.month - 1 c.year = date.year end end |