class DMap::Validations::LengthOf

Attributes

ret[RW]

Public Class Methods

is_valid?(command) click to toggle source

Return true if it’s valid

# File lib/dmap/validations/length.rb, line 34
def self.is_valid?(command)
  @ret = DMap::Validations::Core::Numbers.run command
  !(ret[:min].nil? and ret[:max].nil? and ret[:within].nil? and ret[:equals].nil?)
end
parent_name() click to toggle source

for aliases

# File lib/dmap/validations/length.rb, line 25
def self.parent_name
  "LengthOf"
end
ret() click to toggle source
# File lib/dmap/validations/length.rb, line 29
def self.ret
  @ret
end
validate(command=nil) click to toggle source
# File lib/dmap/validations/length.rb, line 39
def self.validate(command=nil)
  @ret ||= DMap::Validations::Core::Numbers.run command
end