diff --git a/lib/grape_entity/delegator/hash_object.rb b/lib/grape_entity/delegator/hash_object.rb index aab555cc..27b30b66 100644 --- a/lib/grape_entity/delegator/hash_object.rb +++ b/lib/grape_entity/delegator/hash_object.rb @@ -5,6 +5,10 @@ class HashObject < Base def delegate(attribute) object[attribute] end + + def delegatable?(attribute) + object.key? attribute + end end end end