Sha256: 8154e94dedc65007e2c66cf806767aa942545ab1118285d9f29afcb4cf7a2a80

Contents?: true

Size: 649 Bytes

Versions: 19

Compression:

Stored size: 649 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

19 entries across 19 versions & 1 rubygems

Version Path
representable-3.0.4 lib/representable/object.rb
representable-3.0.3 lib/representable/object.rb
representable-3.0.2 lib/representable/object.rb
representable-3.0.1 lib/representable/object.rb
representable-3.0.0 lib/representable/object.rb
representable-2.4.1 lib/representable/object.rb
representable-2.4.0 lib/representable/object.rb
representable-2.4.0.rc5 lib/representable/object.rb
representable-2.4.0.rc4 lib/representable/object.rb
representable-2.4.0.rc3 lib/representable/object.rb
representable-2.4.0.rc2 lib/representable/object.rb
representable-2.4.0.rc1 lib/representable/object.rb
representable-2.3.0 lib/representable/object.rb
representable-2.2.3 lib/representable/object.rb
representable-2.2.2 lib/representable/object.rb
representable-2.2.1 lib/representable/object.rb
representable-2.2.0 lib/representable/object.rb
representable-2.1.8 lib/representable/object.rb
representable-2.1.7 lib/representable/object.rb