class DMap::Validations::Lazy

Attributes

property[RW]

Public Class Methods

is_valid?(command=nil) click to toggle source
# File lib/dmap/validations/misc.rb, line 23
def self.is_valid?(command=nil)
  command ||= "true"
  (command == "true" or command == "false" or !command.match('^[\:A-Za-z_\-]+$').nil?)
end
property() click to toggle source
# File lib/dmap/validations/misc.rb, line 21
def self.property; true; end
validate(command=nil) click to toggle source
# File lib/dmap/validations/misc.rb, line 28
def self.validate(command=nil)
  if command == "true" or command == "false"
    command
  else
    DMap::Validations::Core::When.run(command)
  end
end