Sha256: 082e443d5fd6764fd01f979253e6e5bd066544c116d8ca72f57c3049133c0729

Contents?: true

Size: 367 Bytes

Versions: 29

Compression:

Stored size: 367 Bytes

Contents

class Lono::Template::Strategy::Dsl::Builder
  module Stringify
    # Accounts for Arrays also. ActiveSupport only works for Hashes.
    def stringify!(data)
      case data
      when Array
        data.map! { |i| stringify!(i) }
      when Hash
        data.deep_transform_keys! { |k| k.to_s }
      else
        data # do not transform
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lono-7.5.2 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.5.1 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.5.0 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.11 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.10 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.9 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.8 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.7 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.6 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.5 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.4 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.3 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.2 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.1 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.4.0 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.3.2 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.3.1 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.3.0 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.2.3 lib/lono/template/strategy/dsl/builder/stringify.rb
lono-7.2.2 lib/lono/template/strategy/dsl/builder/stringify.rb