class Sparrow::Strategies::RackBodyJsonFormatStrategy
Public Instance Methods
convert(input)
click to toggle source
@param [#body] input the JSON input object @return [String] the input body
# File lib/sparrow/strategies/json_format_strategies/rack_body_json_format_strategy.rb, line 17 def convert(input) input.body end
match?(input)
click to toggle source
Checks if the input is a RackBody @param [#body] input the possible JSON input object @return [Boolean] True if the given input responds to body
# File lib/sparrow/strategies/json_format_strategies/rack_body_json_format_strategy.rb, line 10 def match?(input) input.respond_to?(:body) end