Class: DMap::Validations::Lazy
- Inherits:
-
Object
- Object
- DMap::Validations::Lazy
- Defined in:
- lib/dmap/validations/misc.rb
Instance Attribute Summary collapse
-
#property ⇒ Object
Returns the value of attribute property.
Class Method Summary collapse
Instance Attribute Details
#property ⇒ Object
Returns the value of attribute property.
19 20 21 |
# File 'lib/dmap/validations/misc.rb', line 19 def property @property end |
Class Method Details
.is_valid?(command = nil) ⇒ Boolean
23 24 25 26 |
# 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 ⇒ Object
21 |
# File 'lib/dmap/validations/misc.rb', line 21 def self.property; true; end |
.validate(command = nil) ⇒ Object
28 29 30 31 32 33 34 |
# 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 |