Class: AwSec::Providers::MyIp

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

Instance Method Summary collapse

Instance Method Details

#configureObject



14
15
16
17
18
19
20
# File 'lib/providers/my_ip.rb', line 14

def configure
  result = {}
  result[:my_ip_username] = ask('My IP username')
  result[:my_ip_password] = ask('My IP password') { |q| q.echo = "*" }
  
  result
end

#get_public_ip(options) ⇒ Object



10
11
12
# File 'lib/providers/my_ip.rb', line 10

def get_public_ip(options)
	Net::HTTP.get(URI "http://auto.whatismyip.com/ip.php?user=#{options[:my_ip_username]}&password=#{options[:my_ip_password]}")
end