Sha256: 0ad0905eb8cabe96aa76731fd0b14e17ff80ab151e51e01514119dae157537d7

Contents?: true

Size: 404 Bytes

Versions: 34

Compression:

Stored size: 404 Bytes

Contents

module ArchitectureJS
  module Helpers
    
    def array_to_yml(array)
      yml = array.empty? ? '[]' : %Q{['#{array.join("', '")}']}
    end

    def symbolize_keys(hash)
      symbolized_hash = Hash.new
      hash.each do |key, value|
        symbolized_hash[key.to_sym] = value
      end
      symbolized_hash
    end

    module_function :array_to_yml,
                    :symbolize_keys
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
architecture-js-0.6.3 lib/architecture-js/helpers.rb
architecture-js-0.6.2 lib/architecture-js/helpers.rb
architecture-js-0.6.1 lib/architecture-js/helpers.rb
architecture-js-0.6.0 lib/architecture-js/helpers.rb
architecture-js-0.5.8 lib/architecture-js/helpers.rb
architecture-js-0.5.7 lib/architecture-js/helpers.rb
architecture-js-0.5.6 lib/architecture-js/helpers.rb
architecture-js-0.5.5 lib/architecture-js/helpers.rb
architecture-js-0.5.4 lib/architecture-js/helpers.rb
architecture-js-0.5.3 lib/architecture-js/helpers.rb
architecture-js-0.5.2 lib/architecture-js/helpers.rb
architecture-js-0.5.1 lib/architecture-js/helpers.rb
architecture-js-0.5.0 lib/architecture-js/helpers.rb
architecture-js-0.4.0 lib/architecture-js/helpers.rb
architecture-js-0.3.8 lib/architecture-js/helpers.rb
architecture-js-0.3.7 lib/architecture-js/helpers.rb
architecture-js-0.3.6 lib/architecture-js/helpers.rb
architecture-js-0.3.5 lib/architecture-js/helpers.rb
architecture-js-0.3.4 lib/architecture-js/helpers.rb
architecture-js-0.3.3 lib/architecture-js/helpers.rb