Class: DMap::Validations::Reader

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#propertyObject

Returns the value of attribute property.



44
45
46
# File 'lib/dmap/validations/access.rb', line 44

def property
  @property
end

Class Method Details

.is_valid?(command) ⇒ Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/dmap/validations/access.rb', line 48

def self.is_valid?(command)
  (command == "protected" or command == "public" or command == "private")
end

.propertyObject



46
# File 'lib/dmap/validations/access.rb', line 46

def self.property; true; end

.validate(command = nil) ⇒ Object



52
53
54
55
# File 'lib/dmap/validations/access.rb', line 52

def self.validate(command=nil)
  command ||= "protected"
  ":" + command
end