Class: Ad::AgentArchitecture::Report::DslGenerator
- Inherits:
-
Object
- Object
- Ad::AgentArchitecture::Report::DslGenerator
- Includes:
- KLog::Logging
- Defined in:
- lib/ad/agent_architecture/report/dsl_generator.rb
Overview
Generate DSL for an Agent Architecture workflow based on the workflow hash
Instance Attribute Summary collapse
-
#clipboard ⇒ Object
readonly
Returns the value of attribute clipboard.
-
#display ⇒ Object
readonly
Returns the value of attribute display.
Instance Method Summary collapse
- #dsl_for_attributes ⇒ Object
- #dsl_for_prompts ⇒ Object
- #dsl_for_sections ⇒ Object
- #dsl_for_settings ⇒ Object
- #dsl_for_workflow ⇒ Object
-
#initialize(workflow, display: true, clipboard: false) ⇒ DslGenerator
constructor
A new instance of DslGenerator.
Constructor Details
#initialize(workflow, display: true, clipboard: false) ⇒ DslGenerator
Returns a new instance of DslGenerator.
13 14 15 16 17 18 19 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 13 def initialize(workflow, display: true, clipboard: false) @workflow_hash = workflow if workflow.is_a?(Hash) @workflow_hash = workflow.workflow if workflow.is_a?(Ad::AgentArchitecture::Dsl::WorkflowDsl) @display = display @clipboard = clipboard end |
Instance Attribute Details
#clipboard ⇒ Object (readonly)
Returns the value of attribute clipboard.
11 12 13 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 11 def clipboard @clipboard end |
#display ⇒ Object (readonly)
Returns the value of attribute display.
10 11 12 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 10 def display @display end |
Instance Method Details
#dsl_for_attributes ⇒ Object
27 28 29 30 31 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 27 def dsl_for_attributes attributes_dsl = build_attributes_dsl render(attributes_dsl) attributes_dsl end |
#dsl_for_prompts ⇒ Object
33 34 35 36 37 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 33 def dsl_for_prompts prompts_dsl = build_prompts_dsl render(prompts_dsl) prompts_dsl end |
#dsl_for_sections ⇒ Object
39 40 41 42 43 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 39 def dsl_for_sections sections_dsl = build_sections_dsl render(sections_dsl) sections_dsl end |
#dsl_for_settings ⇒ Object
21 22 23 24 25 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 21 def dsl_for_settings settings_dsl = build_settings_dsl render(settings_dsl) settings_dsl end |
#dsl_for_workflow ⇒ Object
45 46 47 48 49 |
# File 'lib/ad/agent_architecture/report/dsl_generator.rb', line 45 def dsl_for_workflow workflow_dsl = build_workflow_dsl render(workflow_dsl) workflow_dsl end |