Class: ZAWS::External::AWSCLI::Commands::EC2::CreateRouteTable

Inherits:
Object
  • Object
show all
Defined in:
lib/zaws/external/awscli/commands/ec2/create_route_table.rb

Instance Method Summary collapse

Constructor Details

#initialize(shellout = nil, awscli = nil) ⇒ CreateRouteTable

Returns a new instance of CreateRouteTable.



7
8
9
10
11
# File 'lib/zaws/external/awscli/commands/ec2/create_route_table.rb', line 7

def initialize(shellout=nil, awscli=nil)
  @shellout=shellout
  @awscli=awscli
  clear_settings
end

Instance Method Details

#awsObject



13
14
15
16
# File 'lib/zaws/external/awscli/commands/ec2/create_route_table.rb', line 13

def aws
  @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self)
  @aws
end

#clear_settingsObject



18
19
20
21
# File 'lib/zaws/external/awscli/commands/ec2/create_route_table.rb', line 18

def clear_settings
  @aws=nil
  @vpc_id=nil
end

#get_commandObject



28
29
30
31
32
# File 'lib/zaws/external/awscli/commands/ec2/create_route_table.rb', line 28

def get_command
  command = "ec2 create-route-table"
  command = "#{command} --vpc-id #{@vpc_id}" if @vpc_id
  return command
end

#vpc_id(vpc_id) ⇒ Object



23
24
25
26
# File 'lib/zaws/external/awscli/commands/ec2/create_route_table.rb', line 23

def vpc_id(vpc_id)
  @vpc_id=vpc_id
  self
end