Class: Stackster::StackReader
- Inherits:
-
Object
- Object
- Stackster::StackReader
- Defined in:
- lib/stackster/stack/stack_reader.rb
Instance Method Summary collapse
- #attributes ⇒ Object
- #events(limit) ⇒ Object
-
#initialize(args) ⇒ StackReader
constructor
A new instance of StackReader.
- #instances ⇒ Object
- #outputs ⇒ Object
- #parameters ⇒ Object
- #resources ⇒ Object
- #status ⇒ Object
- #template ⇒ Object
Constructor Details
#initialize(args) ⇒ StackReader
Returns a new instance of StackReader.
4 5 6 7 |
# File 'lib/stackster/stack/stack_reader.rb', line 4 def initialize(args) @name = args[:name] @config = args[:config] end |
Instance Method Details
#attributes ⇒ Object
9 10 11 |
# File 'lib/stackster/stack/stack_reader.rb', line 9 def attributes entry.attributes end |
#events(limit) ⇒ Object
21 22 23 |
# File 'lib/stackster/stack/stack_reader.rb', line 21 def events(limit) cloud_formation.stack_events @name, limit end |
#instances ⇒ Object
38 39 40 |
# File 'lib/stackster/stack/stack_reader.rb', line 38 def instances instance_reader.list_stack_instances @name end |
#outputs ⇒ Object
13 14 15 |
# File 'lib/stackster/stack/stack_reader.rb', line 13 def outputs cloud_formation.stack_outputs @name end |
#parameters ⇒ Object
33 34 35 36 |
# File 'lib/stackster/stack/stack_reader.rb', line 33 def parameters json = JSON.parse template json['Parameters'].nil? ? [] : json['Parameters'].keys end |
#resources ⇒ Object
25 26 27 |
# File 'lib/stackster/stack/stack_reader.rb', line 25 def resources cloud_formation.stack_resources @name end |
#status ⇒ Object
17 18 19 |
# File 'lib/stackster/stack/stack_reader.rb', line 17 def status cloud_formation.stack_status @name end |
#template ⇒ Object
29 30 31 |
# File 'lib/stackster/stack/stack_reader.rb', line 29 def template cloud_formation.template @name end |