Sha256: cc98c0c26548629f850da029fa655280ae22bfcfa08f38fa17778444a9282a13

Contents?: true

Size: 250 Bytes

Versions: 9

Compression:

Stored size: 250 Bytes

Contents

# frozen_string_literal: true

module Grape
  class Entity
    module Delegator
      class HashObject < Base
        def delegate(attribute, hash_access: :to_sym)
          object[attribute.send(hash_access)]
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
grape-entity-1.0.1 lib/grape_entity/delegator/hash_object.rb
grape-entity-1.0.0 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.10.2 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.10.1 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.10.0 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.9.0 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.8.2 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.8.1 lib/grape_entity/delegator/hash_object.rb
grape-entity-0.8.0 lib/grape_entity/delegator/hash_object.rb