Class: Nocode::Steps::Deserialize::Yaml
- Inherits:
-
Nocode::Step
- Object
- Nocode::Step
- Nocode::Steps::Deserialize::Yaml
- Defined in:
- lib/nocode/steps/deserialize/yaml.rb
Overview
Take a specified register and parse it as YAML to produce Ruby object(s).
NOTE: This will throw an error if unsafe YAML types are used. The only allowed types are array, hash, strings, numbers, booleans, nil. See: ruby-doc.org/stdlib-2.6.1/libdoc/psych/rdoc/Psych.html#method-c-safe_load
Constant Summary
Constants included from Util::Optionable
Util::Optionable::OPTION_PREFIX
Instance Attribute Summary
Attributes inherited from Nocode::Step
#context, #name, #options, #type
Instance Method Summary collapse
Methods inherited from Nocode::Step
Methods included from Util::Optionable
included, #method_missing, #options, #respond_to_missing?
Methods included from Util::Arrayable
Constructor Details
This class inherits a constructor from Nocode::Step
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Nocode::Util::Optionable
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 |
# File 'lib/nocode/steps/deserialize/yaml.rb', line 14 def perform input = registers[register_option] registers[register_option] = YAML.safe_load(input) end |