Sha256: a450432cc0a7d967cf8e0a6f8d00e8aeca72aaef7a86e1caa4062be18cd2914e

Contents?: true

Size: 314 Bytes

Versions: 95

Compression:

Stored size: 314 Bytes

Contents

module SafeYAML
  class Transform
    class ToSymbol
      MATCHER = /\A:"?(\w+)"?\Z/.freeze

      def transform?(value, options=nil)
        options ||= SafeYAML::OPTIONS
        return false unless options[:deserialize_symbols] && MATCHER.match(value)
        return true, $1.to_sym
      end
    end
  end
end

Version data entries

95 entries across 95 versions & 3 rubygems

Version Path
puppet-3.3.1.rc2 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.3.1.rc1 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.3.0 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.3.0.rc3 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.3.0.rc2 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.2.4 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-2.7.23 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.2.3 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.2.3.rc1 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-3.2.2 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
puppet-2.7.22 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_symbol.rb
safe_yaml-0.9.3 lib/safe_yaml/transform/to_symbol.rb
safe_yaml-0.9.2 lib/safe_yaml/transform/to_symbol.rb
safe_yaml-0.9.1 lib/safe_yaml/transform/to_symbol.rb
safe_yaml-0.9.0 lib/safe_yaml/transform/to_symbol.rb