Sha256: 43469a1ba15a2c36d8215a2bc29f3c5daae63849be20ed7dec003792041c4fd1

Contents?: true

Size: 506 Bytes

Versions: 14

Compression:

Stored size: 506 Bytes

Contents

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

module Representable::JSON
  # "Lonely Hash" support.
  module Hash
    def self.included(base)
      base.class_eval do
        include Representable
        extend ClassMethods
        include Representable::JSON
        include Representable::HashMethods
        property(:_self, hash: true)
      end
    end


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

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/representable-3.2.0/lib/representable/json/hash.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/representable-3.2.0/lib/representable/json/hash.rb
representable-3.2.0 lib/representable/json/hash.rb
representable-3.1.1 lib/representable/json/hash.rb
representable-3.1.0 lib/representable/json/hash.rb
representable-3.0.1 lib/representable/json/hash.rb
representable-3.0.0 lib/representable/json/hash.rb
representable-2.4.1 lib/representable/json/hash.rb
representable-2.4.0 lib/representable/json/hash.rb
representable-2.4.0.rc5 lib/representable/json/hash.rb
representable-2.4.0.rc4 lib/representable/json/hash.rb
representable-2.4.0.rc3 lib/representable/json/hash.rb
representable-2.4.0.rc2 lib/representable/json/hash.rb
representable-2.4.0.rc1 lib/representable/json/hash.rb