Sha256: 8767fe9c1b1534f34de89cbd5c0da6496958c88f86a0e12c8a405ec0cefbd13d

Contents?: true

Size: 650 Bytes

Versions: 5

Compression:

Stored size: 650 Bytes

Contents

require 'representable'
require 'representable/object/binding'

module Representable
  module Object
    def self.included(base)
      base.class_eval do
        include Representable
        extend ClassMethods
        register_feature Representable::Object
      end
    end


    module ClassMethods
      def collection_representer_class
        Collection
      end
    end

    def from_object(data, options={}, binding_builder=Binding)
      update_properties_from(data, options, binding_builder)
    end

    def to_object(options={}, binding_builder=Binding)
      create_representation_with(nil, options, binding_builder)
    end
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/representable-3.2.0/lib/representable/object.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/representable-3.2.0/lib/representable/object.rb
representable-3.2.0 lib/representable/object.rb
representable-3.1.1 lib/representable/object.rb
representable-3.1.0 lib/representable/object.rb