Sha256: ed29db06ecb59eb5d4a94799b4f17801833afb546e25c5d2a5dbf550340db5de

Contents?: true

Size: 465 Bytes

Versions: 5

Compression:

Stored size: 465 Bytes

Contents

require 'representable/hash_methods'

module Representable::JSON
  module Hash
    include Representable::JSON
    include 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

5 entries across 5 versions & 1 rubygems

Version Path
representable-1.2.8 lib/representable/json/hash.rb
representable-1.2.7 lib/representable/json/hash.rb
representable-1.2.6 lib/representable/json/hash.rb
representable-1.2.5 lib/representable/json/hash.rb
representable-1.2.4 lib/representable/json/hash.rb