Class: Bcome::Terraform::Parser
- Inherits:
-
Object
- Object
- Bcome::Terraform::Parser
- Defined in:
- lib/objects/terraform/parser.rb
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(namespace) ⇒ Parser
constructor
A new instance of Parser.
- #resources ⇒ Object
- #state ⇒ Object
Constructor Details
#initialize(namespace) ⇒ Parser
3 4 5 |
# File 'lib/objects/terraform/parser.rb', line 3 def initialize(namespace) @namespace = namespace end |
Instance Method Details
#attributes ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/objects/terraform/parser.rb', line 7 def attributes a = {} resources.keys.each do |key| a[key] = resources[key]["primary"]["attributes"] end a end |
#resources ⇒ Object
15 16 17 |
# File 'lib/objects/terraform/parser.rb', line 15 def resources state.resources end |
#state ⇒ Object
19 20 21 |
# File 'lib/objects/terraform/parser.rb', line 19 def state @state ||= ::Bcome::Terraform::State.new(@namespace) end |