Class: ASIR::Coder::Yaml
- Inherits:
-
ASIR::Coder
- Object
- ASIR::Coder
- ASIR::Coder::Yaml
- Defined in:
- lib/asir/coder/yaml.rb
Overview
!SLIDE YAML Coder Use YAML for encode/decode.
Instance Attribute Summary collapse
-
#yaml_options ⇒ Object
Returns the value of attribute yaml_options.
Attributes included from Log
Instance Method Summary collapse
Methods inherited from ASIR::Coder
#_subclass_responsibility, #decode, #encode, #prepare
Methods included from Log
#_log, #_log_enabled=, #_log_enabled?, #_log_format, #_log_result, enabled, enabled=, included
Methods included from Initialization
Instance Attribute Details
#yaml_options ⇒ Object
Returns the value of attribute yaml_options.
26 27 28 |
# File 'lib/asir/coder/yaml.rb', line 26 def end |
Instance Method Details
#_decode(obj) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/asir/coder/yaml.rb', line 17 def _decode obj case obj = ::YAML::load(obj) when Message, Result obj.decode_more! else obj end end |
#_encode(obj) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/asir/coder/yaml.rb', line 9 def _encode obj case obj when Message, Result obj = obj.encode_more! end yaml_dump(obj) end |