Class: JSE::Filter
- Inherits:
-
Object
- Object
- JSE::Filter
- Defined in:
- lib/jse/filter.rb
Instance Method Summary collapse
-
#initialize(field, text) ⇒ Filter
constructor
A new instance of Filter.
- #match?(json) ⇒ Boolean
Constructor Details
#initialize(field, text) ⇒ Filter
Returns a new instance of Filter.
3 4 5 |
# File 'lib/jse/filter.rb', line 3 def initialize(field, text) @field, @text = field, text end |
Instance Method Details
#match?(json) ⇒ Boolean
7 8 9 |
# File 'lib/jse/filter.rb', line 7 def match?(json) json[@field] == @text end |