Class: Balance::Providers::LocumRu

Inherits:
Object
  • Object
show all
Defined in:
lib/balance/providers/locum_ru.rb

Instance Method Summary collapse

Instance Method Details

#check(login, password) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/balance/providers/locum_ru.rb', line 5

def check( , password )
  agent = Mechanize.new

   = agent.get 'http://locum.ru/'
   = .forms.first
  .field(:name => 'login_data[login]').value = 
  .field(:name => 'login_data[password]').value = password

  .submit.parser.css('#cpl-data .section .value .number').first.text.to_f
end