Class: Grape::Entity::Delegator::HashObject
- Defined in:
- lib/grape_entity/delegator/hash_object.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#accepts_options?, #delegatable?, #initialize
Constructor Details
This class inherits a constructor from Grape::Entity::Delegator::Base
Instance Method Details
#delegate(attribute, hash_access: :to_sym) ⇒ Object
7 8 9 |
# File 'lib/grape_entity/delegator/hash_object.rb', line 7 def delegate(attribute, hash_access: :to_sym) object[attribute.send(hash_access)] end |