Class: PVN::OptionExactMatch
- Inherits:
-
OptionMatch
- Object
- OptionMatch
- PVN::OptionExactMatch
- Defined in:
- lib/synoption/match.rb
Instance Method Summary collapse
-
#initialize(tag, name) ⇒ OptionExactMatch
constructor
A new instance of OptionExactMatch.
- #match?(arg) ⇒ Boolean
Constructor Details
#initialize(tag, name) ⇒ OptionExactMatch
Returns a new instance of OptionExactMatch.
17 18 19 20 |
# File 'lib/synoption/match.rb', line 17 def initialize tag, name @tag = tag @name = name end |
Instance Method Details
#match?(arg) ⇒ Boolean
22 23 24 |
# File 'lib/synoption/match.rb', line 22 def match? arg arg == @tag || arg == '--' + @name.to_s end |