Class: Eco::API::UseCases::GraphQL::Samples::Pages::Template::Deploy::Applier::Outcome
- Inherits:
-
Struct
- Object
- Struct
- Eco::API::UseCases::GraphQL::Samples::Pages::Template::Deploy::Applier::Outcome
- Defined in:
- lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb
Overview
Result of an apply attempt. committed? is only true when the batch was actually sent live.
Instance Attribute Summary collapse
-
#commands ⇒ Object
Returns the value of attribute commands.
-
#committed ⇒ Object
Returns the value of attribute committed.
-
#response ⇒ Object
Returns the value of attribute response.
-
#skipped_reason ⇒ Object
Returns the value of attribute skipped_reason.
-
#unsupported ⇒ Object
Returns the value of attribute unsupported.
Instance Method Summary collapse
Instance Attribute Details
#commands ⇒ Object
Returns the value of attribute commands
24 25 26 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 24 def commands @commands end |
#committed ⇒ Object
Returns the value of attribute committed
24 25 26 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 24 def committed @committed end |
#response ⇒ Object
Returns the value of attribute response
24 25 26 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 24 def response @response end |
#skipped_reason ⇒ Object
Returns the value of attribute skipped_reason
24 25 26 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 24 def skipped_reason @skipped_reason end |
#unsupported ⇒ Object
Returns the value of attribute unsupported
24 25 26 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 24 def unsupported @unsupported end |
Instance Method Details
#applied? ⇒ Boolean
30 31 32 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 30 def applied? committed? || dry_run? end |
#committed? ⇒ Boolean
26 27 28 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 26 def committed? committed ? true : false end |
#dry_run? ⇒ Boolean
34 35 36 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 34 def dry_run? !committed? && skipped_reason.nil? end |
#to_h ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 38 def to_h { committed: committed?, commands: commands, unsupported: Array(unsupported).map { |c| c.respond_to?(:to_h) ? c.to_h : c }, skipped_reason: skipped_reason }.compact end |