Class: DMap::Validations::Accessor
- Inherits:
-
Object
- Object
- DMap::Validations::Accessor
- Defined in:
- lib/dmap/validations/access.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#property ⇒ Object
Returns the value of attribute property.
Class Method Summary collapse
-
.is_valid?(command) ⇒ Boolean
Return true if it’s valid.
-
.parent_name ⇒ Object
for aliases.
- .property ⇒ Object
-
.validate(command = nil) ⇒ Object
This is what’s returned to our template.
Instance Attribute Details
#property ⇒ Object
Returns the value of attribute property.
4 5 6 |
# File 'lib/dmap/validations/access.rb', line 4 def property @property end |
Class Method Details
.is_valid?(command) ⇒ Boolean
Return true if it’s valid
14 15 16 |
# File 'lib/dmap/validations/access.rb', line 14 def self.is_valid?(command) (command == "protected" or command == "public" or command == "private") end |
.parent_name ⇒ Object
for aliases
9 10 11 |
# File 'lib/dmap/validations/access.rb', line 9 def self.parent_name "Accessor" end |
.property ⇒ Object
6 |
# File 'lib/dmap/validations/access.rb', line 6 def self.property; true; end |
.validate(command = nil) ⇒ Object
This is what’s returned to our template
19 20 21 22 |
# File 'lib/dmap/validations/access.rb', line 19 def self.validate(command=nil) command ||= "protected" ":" + command end |