Class: Eco::API::UseCases::GraphQL::Samples::Pages::Template::Base
- Inherits:
-
Base
- Object
- Loaders::Base
- Common::Loaders::CaseBase
- Common::Loaders::UseCase
- Base
- Eco::API::UseCases::GraphQL::Samples::Pages::Template::Base
- Defined in:
- lib/eco/api/usecases/graphql/samples/pages/template/base.rb
Instance Attribute Summary
Attributes included from Lib::ErrorHandling
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
-
#declare(_emitter) ⇒ Object
Declare the desired template structure onto the given CommandEmitter.
-
#desired_commands ⇒ Object
The ordered command batch this template would apply.
- #process ⇒ Object
Methods inherited from Base
Methods included from Language::Methods::CallDetector
Methods included from Language::AuxiliarLogger
Methods inherited from Common::Loaders::UseCase
#cli_apply!, #initialize, #main
Methods included from Common::Loaders::UseCase::CliIdentify
Methods included from Common::Loaders::UseCase::TargetModel
Methods included from Common::Loaders::UseCase::Type
Methods inherited from Common::Loaders::CaseBase
#name, name_only_once!, original_name
Constructor Details
This class inherits a constructor from Eco::API::Common::Loaders::UseCase
Instance Method Details
#declare(_emitter) ⇒ Object
Declare the desired template structure onto the given CommandEmitter.
46 47 48 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/base.rb', line 46 def declare(_emitter) raise NotImplementedError, "Implement #declare(emitter) in #{self.class}" end |
#desired_commands ⇒ Object
The ordered command batch this template would apply. Pure — no client needed.
51 52 53 54 55 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/base.rb', line 51 def desired_commands emitter = CommandEmitter.new declare(emitter) emitter.commands end |
#process ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/eco/api/usecases/graphql/samples/pages/template/base.rb', line 34 def process commands = desired_commands if simulate? log(:info) { (commands) } return nil end apply(commands) end |