Class: EmailDetector::Detector

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/email_detector/detector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#emailsObject 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

#ignoredObject (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