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