lib/grape_entity/exposure/base.rb in grape-entity-0.8.1 vs lib/grape_entity/exposure/base.rb in grape-entity-0.8.2
- old
+ new
@@ -111,14 +111,12 @@
def key(entity = nil)
@key.respond_to?(:call) ? entity.exec_with_object(@options, &@key) : @key
end
- def with_attr_path(entity, options)
+ def with_attr_path(entity, options, &block)
path_part = attr_path(entity, options)
- options.with_attr_path(path_part) do
- yield
- end
+ options.with_attr_path(path_part, &block)
end
def override?
@override
end