Class: EmailDetector::Detector
- Inherits:
-
Object
- Object
- EmailDetector::Detector
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/email_detector/detector.rb
Instance Attribute Summary collapse
-
#emails ⇒ Object
(also: #to_s)
Returns the value of attribute emails.
-
#ignored ⇒ Object
readonly
Returns the value of attribute ignored.
Instance Method Summary collapse
- #+(other) ⇒ Object
- #==(other) ⇒ Object
-
#initialize(input) ⇒ Detector
constructor
A new instance of Detector.
Constructor Details
#initialize(input) ⇒ Detector
Returns a new instance of Detector.
14 15 16 |
# File 'lib/email_detector/detector.rb', line 14 def initialize input self.emails = input end |
Instance Attribute Details
#emails ⇒ Object Also known as: to_s
Returns the value of attribute emails.
8 9 10 |
# File 'lib/email_detector/detector.rb', line 8 def emails @emails end |
#ignored ⇒ Object (readonly)
Returns the value of attribute ignored.
8 9 10 |
# File 'lib/email_detector/detector.rb', line 8 def ignored @ignored end |
Instance Method Details
#+(other) ⇒ Object
30 31 32 |
# File 'lib/email_detector/detector.rb', line 30 def + other self.class.new(to_a + other.to_a) end |
#==(other) ⇒ Object
34 35 36 |
# File 'lib/email_detector/detector.rb', line 34 def == other to_a == Array(other) end |