Class: Ltsvr::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/ltsvr/cli.rb

Instance Method Summary collapse

Constructor Details

#initialize(label, value) ⇒ Filter

Returns a new instance of Filter.



129
130
131
132
# File 'lib/ltsvr/cli.rb', line 129

def initialize(label, value)
  @label = label.intern
  @value = value
end

Instance Method Details

#match?(hash) ⇒ Boolean

Returns:

  • (Boolean)


134
135
136
# File 'lib/ltsvr/cli.rb', line 134

def match?(hash)
  hash[@label] && hash[@label].match(@value)
end