Class: Achoo::Achievo::LockMonthForm

Inherits:
Object
  • Object
show all
Defined in:
lib/achoo/achievo/lock_month_form.rb

Instance Method Summary collapse

Instance Method Details

#lock_month(period) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/achoo/achievo/lock_month_form.rb', line 7

def lock_month(period)
  page  = AGENT.get(RC[:lock_months_url])
  @form  = page.form('entryform')

  @form.period = period
  unless user_select.nil?
    user_select.options.each do |opt|
      if opt.text.match(/\(#{RC[:user]}\)$/)
        opt.select
      end
    end
  end

end


22
23
24
25
26
# File 'lib/achoo/achievo/lock_month_form.rb', line 22

def print_values
  puts "Month: #{@form.period}"
  puts " User: #{user_select.value}" unless user_select.nil?

end

#submitObject



28
29
30
# File 'lib/achoo/achievo/lock_month_form.rb', line 28

def submit
  @form.submit
end