Class: PVN::OptionExactMatch

Inherits:
OptionMatch show all
Defined in:
lib/synoption/match.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


22
23
24
# File 'lib/synoption/match.rb', line 22

def match? arg
  arg == @tag || arg == '--' + @name.to_s
end