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.
52 53 54 |
# File 'lib/eac_ruby_utils/yaml.rb', line 52 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
48 49 50 |
# File 'lib/eac_ruby_utils/yaml.rb', line 48 def source @source end |
Instance Method Details
#result ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/eac_ruby_utils/yaml.rb', line 56 def result RESULT_TYPES.each do |type| return send("result_#{type}") if send("result_#{type}?") end source.to_s end |