Class: Ltsvr::Filter
- Inherits:
-
Object
- Object
- Ltsvr::Filter
- Defined in:
- lib/ltsvr/cli.rb
Instance Method Summary collapse
-
#initialize(label, value) ⇒ Filter
constructor
A new instance of Filter.
- #match?(hash) ⇒ Boolean
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
134 135 136 |
# File 'lib/ltsvr/cli.rb', line 134 def match?(hash) hash[@label] && hash[@label].match(@value) end |