class DMap::Associations::Has1

Attributes

associations[RW]

Public Class Methods

associations() click to toggle source
# File lib/dmap/associations/hasn.rb, line 57
def self.associations; true; end
field() click to toggle source
# File lib/dmap/associations/hasn.rb, line 59
def self.field
  "has 1, "
end
is_valid?(command=nil) click to toggle source
# File lib/dmap/associations/hasn.rb, line 67
def self.is_valid?(command=nil)
  (!command.nil? or command or command.is_a? Symbol)
end
parent_name() click to toggle source
# File lib/dmap/associations/hasn.rb, line 63
def self.parent_name
  "Has1"
end
validate(command=nil) click to toggle source
# File lib/dmap/associations/hasn.rb, line 71
def self.validate(command=nil)
  command = command.split('-')
  command[1] = nil if command[1].nil?
  {:fields => command[0].underscore.to_sym, :through => command[1].to_sym}
end