Class: LogInto::HotSpot_Airport

Inherits:
Object
  • Object
show all
Defined in:
lib/weblogin/providers/hotspot_airport.rb

Instance Method Summary collapse

Instance Method Details

#is_mine?(response) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/weblogin/providers/hotspot_airport.rb', line 6

def is_mine? response
  # eg: https://hotspot.t-mobile.net/wlan/start.do?ts=1381305999133
  response.args[:url] =~ /https:\/\/hotspot\.t-mobile\.net\/landing\/TD\/Airport/
end

#login(url, cookie, body) ⇒ Object



19
20
21
# File 'lib/weblogin/providers/hotspot_airport.rb', line 19

def  url, cookie, body
  LogInto::HotSpot.new. url.to_s, cookie
end

#login_with_response(response) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/weblogin/providers/hotspot_airport.rb', line 11

def  response
  # get some fields that are set anyway
  url = URI.parse(response.args[:url])
  cookie = response.args[:headers][:cookie]
  body = response.body
  ( url, cookie, body )
end