Sha256: 14b5b2400c3882e8f7fd12a74ff04af560a76e92d27fb0d8a03bd1de07944b11

Contents?: true

Size: 267 Bytes

Versions: 9

Compression:

Stored size: 267 Bytes

Contents

module VGen
  class LetterGen
    def initialize(
          only: (("A".."Z").to_a + ("a".."z").to_a),
          except: []
        )
      @only, @except = only, except
    end

    def call()
      (@only.to_a - @except.to_a).sample
    end
  end
end

Version data entries

9 entries across 7 versions & 2 rubygems

Version Path
bsielski_control_flow-1.0.0 vendor/bundle/ruby/2.5.0/gems/bsielski_value_generator-1.4.0/lib/v_gen/letter_gen.rb
bsielski_control_flow-1.0.0 vendor/bundle/ruby/2.5.0/gems/bsielski_value_generator-1.3.0/lib/v_gen/letter_gen.rb
bsielski_control_flow-1.0.0 vendor/bundle/ruby/2.5.0/gems/bsielski_value_generator-1.2.0/lib/bsielski_v_gen/letter_gen.rb
bsielski_value_generator-1.4.0 lib/v_gen/letter_gen.rb
bsielski_value_generator-1.3.0 lib/v_gen/letter_gen.rb
bsielski_value_generator-1.2.0 lib/bsielski_v_gen/letter_gen.rb
bsielski_value_generator-1.1.0 lib/bsielski_v_gen/letter_gen.rb
bsielski_value_generator-1.0.1 lib/bsielski_v_gen/letter_gen.rb
bsielski_value_generator-1.0.0 lib/bsielski_v_gen/letter_gen.rb