Sha256: 0a4663b93f7c6e46dc6185e8e25f5a432ec7f7f9f0d4f1656e63705e960b853c

Contents?: true

Size: 252 Bytes

Versions: 9

Compression:

Stored size: 252 Bytes

Contents

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

    def call()
      (@only.to_a.map(&:upcase) - @except.to_a.map(&:upcase))
        .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/upper_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/upper_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/upper_letter_gen.rb
bsielski_value_generator-1.4.0 lib/v_gen/upper_letter_gen.rb
bsielski_value_generator-1.3.0 lib/v_gen/upper_letter_gen.rb
bsielski_value_generator-1.2.0 lib/bsielski_v_gen/upper_letter_gen.rb
bsielski_value_generator-1.1.0 lib/bsielski_v_gen/upper_letter_gen.rb
bsielski_value_generator-1.0.1 lib/bsielski_v_gen/upper_letter_gen.rb
bsielski_value_generator-1.0.0 lib/bsielski_v_gen/upper_letter_gen.rb