Sha256: d4c5436efda5cc4029ba0c8d255fbb637ccf109b87faf4d5c3daf0a56171e6d5

Contents?: true

Size: 251 Bytes

Versions: 9

Compression:

Stored size: 251 Bytes

Contents

module Validation
  def validate_max_length(string, length)
    string.length <= length
  end

  def validate_min_length(string, length)
    string.length >= length
  end

  def validate_range(number, from, to)
    (from..to).cover?(number)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
codebreaker-engine-0.1.7 lib/codebreaker/validation.rb
codebreaker-engine-0.1.6 lib/codebreaker/validation.rb
codebreaker-engine-0.1.5 lib/codebreaker/validation.rb
codebreaker-engine-0.1.4 lib/codebreaker/validation.rb
codebreaker-engine-0.1.3 lib/codebreaker/validation.rb
codebreaker-engine-0.1.2 lib/codebreaker/validation.rb
codebreaker-engine-0.1.1 lib/codebreaker/validation.rb
codebreaker-engine-0.1.0 lib/codebreaker/validation.rb
codebreaker-1.0.0-0.1.0 lib/codebreaker/validation.rb