Class: ZAWS::External::AWSCLI::Commands::EC2::DeleteRoute
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::DeleteRoute
- Defined in:
- lib/zaws/external/awscli/commands/ec2/delete_route.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #destination_cidr_block(cidr) ⇒ Object
- #get_command ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ DeleteRoute
constructor
A new instance of DeleteRoute.
- #instance_id(id) ⇒ Object
- #route_table_id(id) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ DeleteRoute
Returns a new instance of DeleteRoute.
9 10 11 12 13 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 9 def initialize(shellout=nil, awscli=nil) @shellout=shellout @awscli=awscli clear_settings end |
Instance Method Details
#aws ⇒ Object
15 16 17 18 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 15 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#clear_settings ⇒ Object
20 21 22 23 24 25 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 20 def clear_settings @aws=nil @route_table_id=nil @dest_cidr_block=nil @instance_id=nil end |
#destination_cidr_block(cidr) ⇒ Object
32 33 34 35 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 32 def destination_cidr_block(cidr) @dest_cidr_block=cidr self end |
#get_command ⇒ Object
42 43 44 45 46 47 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 42 def get_command command = "ec2 delete-route" command = "#{command} --route-table-id #{@route_table_id}" if @route_table_id command = "#{command} --destination-cidr-block #{@dest_cidr_block}" if @dest_cidr_block return command end |
#instance_id(id) ⇒ Object
37 38 39 40 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 37 def instance_id(id) @instance_id=id self end |
#route_table_id(id) ⇒ Object
27 28 29 30 |
# File 'lib/zaws/external/awscli/commands/ec2/delete_route.rb', line 27 def route_table_id(id) @route_table_id=id self end |