Class: Achoo::Achievo::HourAdministrationForm
- Inherits:
-
Object
- Object
- Achoo::Achievo::HourAdministrationForm
- Defined in:
- lib/achoo/achievo/hour_administration_form.rb
Instance Method Summary collapse
- #flexi_time(date) ⇒ Object
-
#initialize ⇒ HourAdministrationForm
constructor
A new instance of HourAdministrationForm.
- #show_registered_hours_for_day(date) ⇒ Object
- #show_registered_hours_for_week(date) ⇒ Object
Constructor Details
#initialize ⇒ HourAdministrationForm
Returns a new instance of HourAdministrationForm.
10 11 12 |
# File 'lib/achoo/achievo/hour_administration_form.rb', line 10 def initialize @page = nil end |
Instance Method Details
#flexi_time(date) ⇒ Object
22 23 24 25 26 |
# File 'lib/achoo/achievo/hour_administration_form.rb', line 22 def flexi_time(date) set_page_to_view_for_date('dayview', date) @page.body.match(/Flexi time balance: (-?\d+:\d+)/)[1] end |
#show_registered_hours_for_day(date) ⇒ Object
14 15 16 |
# File 'lib/achoo/achievo/hour_administration_form.rb', line 14 def show_registered_hours_for_day(date) show_registered_hours(date, 'dayview', '#rl_1 tr') end |
#show_registered_hours_for_week(date) ⇒ Object
18 19 20 |
# File 'lib/achoo/achievo/hour_administration_form.rb', line 18 def show_registered_hours_for_week(date) show_registered_hours(date, 'weekview', '//form[@name="weekview"]/following::table/tr') end |