Class: DMap::Validations::Unique

Inherits:
Object
  • Object
show all
Defined in:
lib/dmap/validations/uniqueness.rb

Overview

Only need the property tag when the validation attaches itself to the property

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#propertyObject

Returns the value of attribute property.



5
6
7
# File 'lib/dmap/validations/uniqueness.rb', line 5

def property
  @property
end

Class Method Details

.is_valid?(command = nil) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/dmap/validations/uniqueness.rb', line 9

def self.is_valid?(command=nil)
  true # always
end

.propertyObject



7
# File 'lib/dmap/validations/uniqueness.rb', line 7

def self.property; true; end

.validate(command = nil) ⇒ Object



13
14
15
# File 'lib/dmap/validations/uniqueness.rb', line 13

def self.validate(command=nil)
  (command != "true" or command != "false")
end