Sha256: df9a142a615fa88da0f8572884edea449563ad92acf67538fdf5e6ce958c1067

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 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
        extend Representable::Hash::ClassMethods # ::representer_engine.
      end
    end


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


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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
representable-1.8.5 lib/representable/json/hash.rb
representable-1.8.4 lib/representable/json/hash.rb
representable-1.8.3 lib/representable/json/hash.rb