Class: IPis::Lookup
- Inherits:
-
Object
- Object
- IPis::Lookup
- Defined in:
- lib/ipis.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Lookup
constructor
A new instance of Lookup.
- #run ⇒ Object
Constructor Details
#initialize(args) ⇒ Lookup
Returns a new instance of Lookup.
10 11 12 13 14 15 16 17 |
# File 'lib/ipis.rb', line 10 def initialize(args) @ips_to_lookup = args.map(&:strip).uniq if @ips_to_lookup.size == 0 @ips_to_lookup = [''] # fix self end @query_adapter = IPis::Queries::IPApi @formatter_adapter = IPis::Formatters::BaseFormatter end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 |
# File 'lib/ipis.rb', line 19 def run @ips_to_lookup.each do |ip| puts show(ip) puts end end |