Class: JSON::Spec::Matcher
- Inherits:
-
Object
- Object
- JSON::Spec::Matcher
- Defined in:
- lib/jsss/matcher.rb
Constant Summary collapse
- DataTypes =
{ :String => String, :Integer => Numeric }
Instance Method Summary collapse
-
#initialize(spec) ⇒ Matcher
constructor
A new instance of Matcher.
- #match(obj) ⇒ Object
Constructor Details
Instance Method Details
#match(obj) ⇒ Object
16 17 18 19 |
# File 'lib/jsss/matcher.rb', line 16 def match(obj) obj = JSON.parse(obj) if obj.is_a? String do_match(obj, @spec) end |