Class: Eco::API::UseCases::GraphQL::Samples::Pages::Template::Deploy::Applier::TargetBoundExecutor
- Inherits:
-
Object
- Object
- Eco::API::UseCases::GraphQL::Samples::Pages::Template::Deploy::Applier::TargetBoundExecutor
- Defined in:
- lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb
Overview
Adapts the gem Builder::Page-style facade (execute_workflow_commands(model, commands:)) to
the positional-commands contract the gem Diff::Deploy#execute! expects.
Instance Method Summary collapse
- #execute_workflow_commands(commands) ⇒ Object
-
#initialize(facade, target) ⇒ TargetBoundExecutor
constructor
A new instance of TargetBoundExecutor.
Constructor Details
#initialize(facade, target) ⇒ TargetBoundExecutor
Returns a new instance of TargetBoundExecutor.
128 129 130 131 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 128 def initialize(facade, target) @facade = facade @target = target end |
Instance Method Details
#execute_workflow_commands(commands) ⇒ Object
133 134 135 136 137 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/deploy/applier.rb', line 133 def execute_workflow_commands(commands) raise ArgumentError, 'a target model is required for a live apply' unless @target @facade.execute_workflow_commands(@target, commands: commands) end |