class Grape::Entity::Exposure::FormatterBlockExposure
Attributes
format_with[R]
Public Instance Methods
==(other)
click to toggle source
Calls superclass method
Grape::Entity::Exposure::Base#==
# File lib/grape_entity/exposure/formatter_block_exposure.rb, line 15 def ==(other) super && @format_with == other.format_with end
dup()
click to toggle source
Calls superclass method
Grape::Entity::Exposure::Base#dup
# File lib/grape_entity/exposure/formatter_block_exposure.rb, line 11 def dup super(&@format_with) end
setup(&format_with)
click to toggle source
# File lib/grape_entity/exposure/formatter_block_exposure.rb, line 7 def setup(&format_with) @format_with = format_with end
value(entity, _options)
click to toggle source
# File lib/grape_entity/exposure/formatter_block_exposure.rb, line 19 def value(entity, _options) entity.exec_with_attribute(attribute, &@format_with) end