Class: DMap::Validations::Writer

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.



29
30
31
# File 'lib/dmap/validations/access.rb', line 29

def property
  @property
end

Class Method Details

.is_valid?(command) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/dmap/validations/access.rb', line 33

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

.propertyObject



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

def self.property; true; end

.validate(command = nil) ⇒ Object



37
38
39
40
# File 'lib/dmap/validations/access.rb', line 37

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