class SpectranetUser
Constants
- DATA_BALANCE_XPATH
- FORM_ID
- URL
Attributes
password[R]
username[R]
Public Class Methods
new(username, password)
click to toggle source
# File lib/datameter/spectranet_user.rb, line 10 def initialize username, password @username = username @password = password end
Public Instance Methods
get_data_balance()
click to toggle source
# File lib/datameter/spectranet_user.rb, line 15 def get_data_balance visit_link URL balance = find_in_page FORM_ID, {'signInForm.username' => username, 'signInForm.password' => password}, DATA_BALANCE_XPATH if balance != 0 then return balance else return nil end end