Class: Rounders::Matchers::Subject
- Defined in:
- lib/rounders/matchers/subject.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from Matcher
Instance Method Summary collapse
-
#initialize(pattern) ⇒ Subject
constructor
A new instance of Subject.
- #match(mail) ⇒ Object
Methods inherited from Matcher
Methods included from Plugins::Pluggable
Constructor Details
#initialize(pattern) ⇒ Subject
Returns a new instance of Subject.
6 7 8 |
# File 'lib/rounders/matchers/subject.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/subject.rb', line 4 def pattern @pattern end |
Instance Method Details
#match(mail) ⇒ Object
10 11 12 13 |
# File 'lib/rounders/matchers/subject.rb', line 10 def match(mail) return if mail.subject.nil? mail.subject.match(pattern) end |