Class: WelcomeCycle::EmailRegister
- Inherits:
-
Object
- Object
- WelcomeCycle::EmailRegister
- Includes:
- Singleton
- Defined in:
- lib/welcome_cycle/email_register.rb
Instance Attribute Summary collapse
-
#emails ⇒ Object
Returns the value of attribute emails.
Instance Method Summary collapse
- #<<(email) ⇒ Object
- #each ⇒ Object
-
#initialize ⇒ EmailRegister
constructor
A new instance of EmailRegister.
Constructor Details
#initialize ⇒ EmailRegister
Returns a new instance of EmailRegister.
8 9 10 |
# File 'lib/welcome_cycle/email_register.rb', line 8 def initialize @emails = [] end |
Instance Attribute Details
#emails ⇒ Object
Returns the value of attribute emails.
6 7 8 |
# File 'lib/welcome_cycle/email_register.rb', line 6 def emails @emails end |
Instance Method Details
#<<(email) ⇒ Object
12 13 14 |
# File 'lib/welcome_cycle/email_register.rb', line 12 def <<(email) @emails << email end |
#each ⇒ Object
16 17 18 |
# File 'lib/welcome_cycle/email_register.rb', line 16 def each @emails.each { |email| yield(email) } end |