Class: Rounders::Matchers::CC
- Defined in:
- lib/rounders/matchers/cc.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from Matcher
Instance Method Summary collapse
-
#initialize(pattern) ⇒ CC
constructor
A new instance of CC.
- #match(message) ⇒ Object
Methods inherited from Matcher
Methods included from Plugins::Pluggable
Constructor Details
#initialize(pattern) ⇒ CC
Returns a new instance of CC.
6 7 8 |
# File 'lib/rounders/matchers/cc.rb', line 6 def initialize(pattern) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
4 5 6 |
# File 'lib/rounders/matchers/cc.rb', line 4 def pattern @pattern end |
Instance Method Details
#match(message) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rounders/matchers/cc.rb', line 10 def match() return if .cc.nil? matches = .cc.map do |address| address.match(pattern) end matches.compact end |