Class: ZonePull
Instance Attribute Summary
Attributes inherited from Command
#desc, #name
Instance Method Summary
collapse
Methods inherited from Command
#add_arg, #add_cmd, #add_flow, #add_flow_from_usage, #add_input, #add_option, #command_name?, #create_args, #create_flows, #flow_passes_parse, #flow_passes_preconditions, #get_args_used, #init, #initialize, #option_help_string, #run, #show_help, #show_help_option
Constructor Details
This class inherits a constructor from Command
Instance Method Details
#add_options ⇒ Object
52
53
54
|
# File 'lib/zone.rb', line 52
def add_options
add_option({ short_name: 'f', long_name: 'file', method: :save_zone_to_file, takes_value: /.*/, regexp_description: "file name"})
end
|
#execute(args, rest) ⇒ Object
56
57
58
59
|
# File 'lib/zone.rb', line 56
def execute(args, rest)
zone = @input["zone"]
zone.pull @zone_file
end
|
#save_zone_to_file(file) ⇒ Object
48
49
50
|
# File 'lib/zone.rb', line 48
def save_zone_to_file(file)
@zone_file = file
end
|