Sha256: 98c4e4380231f0f728fa1c38cda45e41abec06af4aedf5c7938898c2fa86b09b

Contents?: true

Size: 278 Bytes

Versions: 8

Compression:

Stored size: 278 Bytes

Contents

module Grape
  class Entity
    module Delegator
      class PlainObject < Base
        def delegate(attribute)
          object.send attribute
        end

        def delegatable?(attribute)
          object.respond_to? attribute, true
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grape-entity-0.6.1 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.6.0 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.5.2 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.5.1 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.5.0 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.4.8 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.4.7 lib/grape_entity/delegator/plain_object.rb
grape-entity-0.4.6 lib/grape_entity/delegator/plain_object.rb