Class: Ec2list::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2list/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv = []) ⇒ Command

Returns a new instance of Command.



5
6
7
8
# File 'lib/ec2list/command.rb', line 5

def initialize(argv = [])
  @options = build_options(argv)
  load_profile
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/ec2list/command.rb', line 3

def options
  @options
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
# File 'lib/ec2list/command.rb', line 10

def run
  AWS.memoize do
    fetch_instances.each do |instance|
      print_instance(instance)
    end
  end
end