Class: Robtex::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/robtex/cli.rb

Instance Method Summary collapse

Instance Method Details

#as(query) ⇒ Object



14
15
16
17
18
19
# File 'lib/robtex/cli.rb', line 14

def as(query)
  with_error_handling do
    res = api.as(query)
    puts JSON.pretty_generate(res)
  end
end

#fpdns(query) ⇒ Object



30
31
32
33
34
35
# File 'lib/robtex/cli.rb', line 30

def fpdns(query)
  with_error_handling do
    res = api.fpdns(query)
    puts JSON.pretty_generate(res)
  end
end

#ip(query) ⇒ Object



6
7
8
9
10
11
# File 'lib/robtex/cli.rb', line 6

def ip(query)
  with_error_handling do
    res = api.ip(query)
    puts JSON.pretty_generate(res)
  end
end

#rpdns(query) ⇒ Object



22
23
24
25
26
27
# File 'lib/robtex/cli.rb', line 22

def rpdns(query)
  with_error_handling do
    res = api.rpdns(query)
    puts JSON.pretty_generate(res)
  end
end