Class: Achoo::Plugin::Homescreen
- Inherits:
-
Achoo::PluginBase
- Object
- Achoo::PluginBase
- Achoo::Plugin::Homescreen
- Includes:
- UI::ExceptionHandling
- Defined in:
- lib/achoo/plugin/homescreen.rb
Instance Method Summary collapse
Instance Method Details
#at_startup ⇒ Object
13 14 15 |
# File 'lib/achoo/plugin/homescreen.rb', line 13 def at_startup Term::clearscreen end |
#before_print_menu(date) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/achoo/plugin/homescreen.rb', line 17 def (date) form = Achievo::HourAdministrationForm.new Term::clearscreen case RC[:homescreen] when 'day' form.show_registered_hours_for_day(date) when 'week' form.show_registered_hours_for_week(date) else printf "Unknown homescreen '%s', ignoring\n", RC['homescreen'] end end |
#state_ok? ⇒ Boolean
11 |
# File 'lib/achoo/plugin/homescreen.rb', line 11 def state_ok?; RC.has_key?(:homescreen); end |