Class: RubyTerraform::Models::OutputChange
- Inherits:
-
Object
- Object
- RubyTerraform::Models::OutputChange
- Includes:
- ValueEquality
- Defined in:
- lib/ruby_terraform/models/output_change.rb
Instance Method Summary collapse
- #change ⇒ Object
- #create? ⇒ Boolean
- #delete? ⇒ Boolean
-
#initialize(name, content) ⇒ OutputChange
constructor
A new instance of OutputChange.
- #inspect ⇒ Object
- #name ⇒ Object
- #no_op? ⇒ Boolean
- #present_after? ⇒ Boolean
- #present_before? ⇒ Boolean
- #state ⇒ Object
- #to_h ⇒ Object
- #update? ⇒ Boolean
Methods included from ValueEquality
Constructor Details
#initialize(name, content) ⇒ OutputChange
Returns a new instance of OutputChange.
11 12 13 14 |
# File 'lib/ruby_terraform/models/output_change.rb', line 11 def initialize(name, content) @name = name.to_sym @content = symbolise_keys(content) end |
Instance Method Details
#change ⇒ Object
20 21 22 |
# File 'lib/ruby_terraform/models/output_change.rb', line 20 def change Change.new(@content) end |
#create? ⇒ Boolean
28 29 30 |
# File 'lib/ruby_terraform/models/output_change.rb', line 28 def create? change.create? end |
#delete? ⇒ Boolean
36 37 38 |
# File 'lib/ruby_terraform/models/output_change.rb', line 36 def delete? change.delete? end |
#inspect ⇒ Object
48 49 50 |
# File 'lib/ruby_terraform/models/output_change.rb', line 48 def inspect to_h.inspect end |
#name ⇒ Object
16 17 18 |
# File 'lib/ruby_terraform/models/output_change.rb', line 16 def name @name.to_s end |
#no_op? ⇒ Boolean
24 25 26 |
# File 'lib/ruby_terraform/models/output_change.rb', line 24 def no_op? change.no_op? end |
#present_after? ⇒ Boolean
44 45 46 |
# File 'lib/ruby_terraform/models/output_change.rb', line 44 def present_after? no_op? || create? || update? end |
#present_before? ⇒ Boolean
40 41 42 |
# File 'lib/ruby_terraform/models/output_change.rb', line 40 def present_before? no_op? || update? || delete? end |
#state ⇒ Object
56 57 58 |
# File 'lib/ruby_terraform/models/output_change.rb', line 56 def state [@name, @content] end |
#to_h ⇒ Object
52 53 54 |
# File 'lib/ruby_terraform/models/output_change.rb', line 52 def to_h { @name => @content } end |
#update? ⇒ Boolean
32 33 34 |
# File 'lib/ruby_terraform/models/output_change.rb', line 32 def update? change.update? end |