Class: Sparrow::Strategies::DefaultJsonFormatStrategy
- Inherits:
-
Object
- Object
- Sparrow::Strategies::DefaultJsonFormatStrategy
- Includes:
- Singleton
- Defined in:
- lib/sparrow/strategies/json_format_strategies/default_json_format_strategy.rb
Overview
NullObject JSON Format Strategy Does no direct conversion except casting the given object to a string
Instance Method Summary collapse
-
#convert(input) ⇒ String
The input as a String.
-
#match?(_input) ⇒ Boolean
Matches always since this is the NullObjectStrategy and thus the fallback.
Instance Method Details
#convert(input) ⇒ String
Returns the input as a String.
21 22 23 |
# File 'lib/sparrow/strategies/json_format_strategies/default_json_format_strategy.rb', line 21 def convert(input) input.to_s end |
#match?(_input) ⇒ Boolean
Matches always since this is the NullObjectStrategy and thus the fallback.
14 15 16 |
# File 'lib/sparrow/strategies/json_format_strategies/default_json_format_strategy.rb', line 14 def match?(_input) true end |