Module: SafeYAML::Transform::TransformationMap::ClassMethods

### Home Classes Methods

### In Files

- lib/safe_yaml/transform/transformation_map.rb

### Methods

- #set_predefined_values

### Class/Module Index

Quicksearch

- SafeYAML
- SafeYAML::Deep
- SafeYAML::LibyamlChecker
- SafeYAML::Parse
- SafeYAML::Parse::Date
- SafeYAML::Parse::Hexadecimal
- SafeYAML::Parse::Sexagesimal
- SafeYAML::PsychHandler
- SafeYAML::PsychResolver
- SafeYAML::Resolver
- SafeYAML::SafeToRubyVisitor
- SafeYAML::SyckResolver
- SafeYAML::Transform
- SafeYAML::Transform::ToBoolean
- SafeYAML::Transform::ToDate
- SafeYAML::Transform::ToFloat
- SafeYAML::Transform::ToInteger
- SafeYAML::Transform::ToNil
- SafeYAML::Transform::ToSymbol
- SafeYAML::Transform::TransformationMap
- SafeYAML::Transform::TransformationMap::CaseAgnosticMap
- SafeYAML::Transform::TransformationMap::ClassMethods
- Object
- YAML

No matching classes.

# SafeYAML::Transform::TransformationMap::ClassMethods

### Public Instance Methods

set_predefined_values(predefined_values) click to toggle source

    # File lib/safe_yaml/transform/transformation_map.rb, line 29
    def set_predefined_values(predefined_values)
      if SafeYAML::YAML_ENGINE == "syck"
        expanded_map = predefined_values.inject({}) do |hash, (key, value)|
          hash[key] = value
          hash[key.capitalize] = value
          hash[key.upcase] = value
          hash
        end
      else
        expanded_map = CaseAgnosticMap.new
        expanded_map.merge!(predefined_values)
      end

      self.const_set(:PREDEFINED_VALUES, expanded_map.freeze)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.