Sha256: 594d9375a2864a82e422f847c76908983f5873ee90e8fa0bd9fd79c1c4b06761

Contents?: true

Size: 509 Bytes

Versions: 27

Compression:

Stored size: 509 Bytes

Contents

require 'representable/json'
require 'representable/hash_methods'

module Representable::JSON
  module Hash
    include Representable::JSON
    include Representable::HashMethods

    def self.included(base)
      base.class_eval do
        include Representable
        extend ClassMethods
      end
    end


    module ClassMethods
      def values(options)
        hash :_self, options
      end
    end


    def definition_opts
      [:_self, {:hash => true, :use_attributes => true}]
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
representable-1.8.2 lib/representable/json/hash.rb
representable-1.8.1 lib/representable/json/hash.rb
representable-1.8.0 lib/representable/json/hash.rb
representable-1.7.7 lib/representable/json/hash.rb
representable-1.7.6 lib/representable/json/hash.rb
representable-1.7.5 lib/representable/json/hash.rb
representable-1.7.4 lib/representable/json/hash.rb
representable-1.7.3 lib/representable/json/hash.rb
representable-1.7.2 lib/representable/json/hash.rb
representable-1.7.1 lib/representable/json/hash.rb
representable-1.7.0 lib/representable/json/hash.rb
representable-1.6.1 lib/representable/json/hash.rb
representable-1.6.0 lib/representable/json/hash.rb
representable-1.5.3 lib/representable/json/hash.rb
representable-1.5.2 lib/representable/json/hash.rb
representable-1.5.1 lib/representable/json/hash.rb
representable-1.5.0 lib/representable/json/hash.rb
representable-1.4.2 lib/representable/json/hash.rb
representable-1.4.1 lib/representable/json/hash.rb
representable-1.4.0 lib/representable/json/hash.rb