Class: Grape::Entity::Delegator::PlainObject
- Defined in:
- lib/grape_entity/delegator/plain_object.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#accepts_options?, #initialize
Constructor Details
This class inherits a constructor from Grape::Entity::Delegator::Base
Instance Method Details
#delegatable?(attribute) ⇒ Boolean
11 12 13 |
# File 'lib/grape_entity/delegator/plain_object.rb', line 11 def delegatable?(attribute) object.respond_to? attribute, true end |
#delegate(attribute) ⇒ Object
7 8 9 |
# File 'lib/grape_entity/delegator/plain_object.rb', line 7 def delegate(attribute) object.send attribute end |