class VGen::CharGen
Attributes
char_gen[R]
Public Class Methods
new( only: [ "`", "~", "!", "@", "
click to toggle source
# File lib/v_gen/char_gen.rb, line 4 def initialize( only: [ "`", "~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "+", "=", "[", "{", "]", "}", "\\", "|", ";", ":", "'", "\"", "<", ",", ">", ".", "?", "/", " " ] + ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a, except: [] ) @only, @except = only, except end
Public Instance Methods
call()
click to toggle source
# File lib/v_gen/char_gen.rb, line 17 def call() (@only.to_a - @except.to_a).sample end