Method: XMLMapping::ClassMethods#has_one

Defined in:
lib/xmlmapping.rb

#has_one(attribute, options = {}) ⇒ Object



141
142
143
144
# File 'lib/xmlmapping.rb', line 141

def has_one(attribute, options = {})
	options[:cardinality] = :one
	add(attribute, :element, options)
end