Class: Norikra::Client::Target
- Inherits:
-
Thor
- Object
- Thor
- Norikra::Client::Target
show all
- Includes:
- CLIUtil
- Defined in:
- lib/norikra/client/cli.rb
Instance Method Summary
collapse
Methods included from CLIUtil
#client, #formatter, #parser, #wrap
Instance Method Details
#close(target) ⇒ Object
56
57
58
59
60
|
# File 'lib/norikra/client/cli.rb', line 56
def close(target)
wrap do
client(parent_options).close(target)
end
end
|
#list ⇒ Object
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/norikra/client/cli.rb', line 29
def list
wrap do
puts "TARGET" unless options[:simple]
targets = client(parent_options).targets
targets.each do |t|
puts t
end
puts "#{targets.size} targets found." unless options[:simple]
end
end
|
#open(target, *field_defs) ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/norikra/client/cli.rb', line 41
def open(target, *field_defs)
wrap do
fields = nil
if field_defs.size > 0
fields = {}
field_defs.each do |str|
fname,ftype = str.split(':')
fields[fname] = ftype
end
end
client(parent_options).open(target, fields)
end
end
|