Class: EacRubyUtils::Yaml::Sanitizer
- Defined in:
- lib/eac_ruby_utils/yaml.rb
Constant Summary collapse
- RESULT_TYPES =
%w[permitted enumerableable hashable].freeze
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source) ⇒ Sanitizer
constructor
A new instance of Sanitizer.
- #result ⇒ Object
Constructor Details
#initialize(source) ⇒ Sanitizer
Returns a new instance of Sanitizer.
54 55 56 |
# File 'lib/eac_ruby_utils/yaml.rb', line 54 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
50 51 52 |
# File 'lib/eac_ruby_utils/yaml.rb', line 50 def source @source end |
Instance Method Details
#result ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/eac_ruby_utils/yaml.rb', line 58 def result RESULT_TYPES.each do |type| return send("result_#{type}") if send("result_#{type}?") end source.to_s end |