class Sparrow::Strategies::ArrayJsonFormatStrategy
Public Instance Methods
convert(input)
click to toggle source
Takes the first element from the Array and returns it @param [Array] input the input Array @return [String] the first element of the input as a String
# File lib/sparrow/strategies/json_format_strategies/array_json_format_strategy.rb, line 18 def convert(input) input.first.to_s end
match?(input)
click to toggle source
Matches if input is an Array @param [Object] input the JSON object @return true if the input is an Array
# File lib/sparrow/strategies/json_format_strategies/array_json_format_strategy.rb, line 10 def match?(input) input.is_a? Array end