Class: VGen::LetterGen
- Inherits:
-
Object
- Object
- VGen::LetterGen
- Defined in:
- lib/v_gen/letter_gen.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(only: (("A".."Z").to_a + ("a".."z").to_a), except: []) ⇒ LetterGen
constructor
A new instance of LetterGen.
Constructor Details
#initialize(only: (("A".."Z").to_a + ("a".."z").to_a), except: []) ⇒ LetterGen
Returns a new instance of LetterGen.
3 4 5 6 7 8 |
# File 'lib/v_gen/letter_gen.rb', line 3 def initialize( only: (("A".."Z").to_a + ("a".."z").to_a), except: [] ) @only, @except = only, except end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/v_gen/letter_gen.rb', line 10 def call() (@only.to_a - @except.to_a).sample end |