Class: Ad::AgentArchitecture::Dsl::Actions::SaveYaml
- Inherits:
-
Object
- Object
- Ad::AgentArchitecture::Dsl::Actions::SaveYaml
- Defined in:
- lib/ad/agent_architecture/dsl/actions/save_yaml.rb
Overview
Save workflow graph to YAML file
Instance Method Summary collapse
-
#initialize(workflow_hash) ⇒ SaveYaml
constructor
A new instance of SaveYaml.
- #save(file_name) ⇒ Object
Constructor Details
#initialize(workflow_hash) ⇒ SaveYaml
Returns a new instance of SaveYaml.
11 12 13 |
# File 'lib/ad/agent_architecture/dsl/actions/save_yaml.rb', line 11 def initialize(workflow_hash) @workflow_hash = workflow_hash end |
Instance Method Details
#save(file_name) ⇒ Object
15 16 17 |
# File 'lib/ad/agent_architecture/dsl/actions/save_yaml.rb', line 15 def save(file_name) File.write(file_name, @workflow_hash.to_yaml) end |