Sha256: aa4698c1c50327cbe6f9d4811412684ac69f8d729ce77c4286bdd5c0f2998840

Contents?: true

Size: 313 Bytes

Versions: 1

Compression:

Stored size: 313 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
grape-entity-0.8.0 lib/grape_entity/delegator/plain_object.rb