Module: Sisimai::Reason::Vacation
- Defined in:
- lib/sisimai/reason/vacation.rb
Overview
Sisimai::Reason::Vacation is for only returning text and description. This class is called only from Sisimai.reason method.
Constant Summary collapse
- Index =
[ 'i am away on vacation', 'i am away until', 'i am out of the office', 'i will be traveling for work on', ].freeze
Class Method Summary collapse
- .description ⇒ Object
-
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions.
- .text ⇒ Object
- .true ⇒ Object
Class Method Details
.description ⇒ Object
15 |
# File 'lib/sisimai/reason/vacation.rb', line 15 def description; return 'Email replied automatically due to a recipient is out of office'; end |
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions
20 21 22 23 24 |
# File 'lib/sisimai/reason/vacation.rb', line 20 def match(argv1) return false if argv1.nil? || argv1.empty? return true if Index.any? { |a| argv1.include?(a) } return false end |
.text ⇒ Object
14 |
# File 'lib/sisimai/reason/vacation.rb', line 14 def text; return 'vacation'; end |
.true ⇒ Object
26 |
# File 'lib/sisimai/reason/vacation.rb', line 26 def true(*); return false; end |