Class: PossibleEmail::Permutator
- Inherits:
-
Object
- Object
- PossibleEmail::Permutator
- Defined in:
- lib/possible_email/permutator.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(first_name, last_name, domain) ⇒ Permutator
constructor
A new instance of Permutator.
Constructor Details
#initialize(first_name, last_name, domain) ⇒ Permutator
Returns a new instance of Permutator.
9 10 11 12 13 14 15 |
# File 'lib/possible_email/permutator.rb', line 9 def initialize(first_name, last_name, domain) @first_name = first_name @last_name = last_name @domain = domain.flatten # HACK @first_initial = first_name.chars.first @last_initial = last_name.chars.first end |
Class Method Details
.call(first_name, last_name, *domain) ⇒ Object
5 6 7 |
# File 'lib/possible_email/permutator.rb', line 5 def self.call(first_name, last_name, *domain) new(first_name, last_name, domain).call end |
Instance Method Details
#call ⇒ Object
17 18 19 20 |
# File 'lib/possible_email/permutator.rb', line 17 def call permutations = create_all_permutations permutations end |