Class: DMap::Validations::FormatOf

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

Direct Known Subclasses

Format

Class Method Summary collapse

Class Method Details

.parent_nameObject



4
5
6
# File 'lib/dmap/validations/format.rb', line 4

def self.parent_name
  "FormatOf"
end

.validate(command = nil) ⇒ Object



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

def self.validate(command=nil)
  command = command.to_sym if command.match(/^[A-Za-z]/)
  {:as => command}
end