Class: Nucleon::Translator::YAML
- Inherits:
-
Object
- Object
- Nucleon::Translator::YAML
- Defined in:
- lib/nucleon/translator/YAML.rb
Instance Method Summary collapse
-
#generate(properties) ⇒ Object
—.
-
#parse(yaml_text) ⇒ Object
—————————————————————————– Translator operations.
Instance Method Details
#generate(properties) ⇒ Object
20 21 22 23 24 |
# File 'lib/nucleon/translator/YAML.rb', line 20 def generate(properties) return super do Util::Data.to_yaml(Util::Data.string_map(properties)) end end |
#parse(yaml_text) ⇒ Object
Translator operations
9 10 11 12 13 14 15 16 |
# File 'lib/nucleon/translator/YAML.rb', line 9 def parse(yaml_text) return super do |properties| if yaml_text && ! yaml_text.empty? properties = Util::Data.symbol_map(Util::Data.parse_yaml(yaml_text)) end properties end end |