lib/seventeen_mon.rb in seventeen_mon-0.0.2 vs lib/seventeen_mon.rb in seventeen_mon-0.0.3
- old
+ new
@@ -10,11 +10,12 @@
def self.find_by_ip(_ip)
IP.new(ip: _ip).find
end
- def self.find_by_address(address: nil, protocol: "http")
- IP.new(address: address, protocol: protocol).find
+ def self.find_by_address(_address)
+ prot, addr = _address.split("://")
+ IP.new(address: addr, protocol: prot).find
end
end
SM = SeventeenMon
\ No newline at end of file