Class: AwSec::Providers::MyIp
- Inherits:
-
Object
- Object
- AwSec::Providers::MyIp
- Defined in:
- lib/providers/my_ip.rb
Instance Method Summary collapse
Instance Method Details
#configure ⇒ Object
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() Net::HTTP.get(URI "http://auto.whatismyip.com/ip.php?user=#{[:my_ip_username]}&password=#{[:my_ip_password]}") end |