Class: JSE::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/jse/filter.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


7
8
9
# File 'lib/jse/filter.rb', line 7

def match?(json)
  json[@field] == @text
end