Class: VGen::LowerLetterGen

Inherits:
Object
  • Object
show all
Defined in:
lib/v_gen/lower_letter_gen.rb

Instance Method Summary collapse

Constructor Details

#initialize(only: ("A".."Z"), except: []) ⇒ LowerLetterGen

Returns a new instance of LowerLetterGen.



3
4
5
# File 'lib/v_gen/lower_letter_gen.rb', line 3

def initialize(only: ("A".."Z"), except: [])
  @only, @except = only, except
end

Instance Method Details

#callObject



7
8
9
10
# File 'lib/v_gen/lower_letter_gen.rb', line 7

def call()
  (@only.to_a.map(&:downcase) - @except.to_a.map(&:downcase))
    .sample
end