Class: ZAWS::External::AWSCLI::Commands::EC2::AllocateAddress

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AllocateAddress.



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

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

Instance Method Details

#awsObject



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

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

#clear_settingsObject



19
20
21
22
23
# File 'lib/zaws/external/awscli/commands/ec2/allocate_address.rb', line 19

def clear_settings
  @domain=nil
  @aws=nil
  self
end

#domain(domain) ⇒ Object



25
26
27
28
# File 'lib/zaws/external/awscli/commands/ec2/allocate_address.rb', line 25

def domain(domain)
  @domain=domain
  self
end

#get_commandObject



30
31
32
33
34
# File 'lib/zaws/external/awscli/commands/ec2/allocate_address.rb', line 30

def get_command
  command = "ec2 allocate-address"
  command = "#{command} --domain #{@domain}" if @domain
  return command
end