Module: Rails3::Assist::Orm::DataMapper

Includes:
Base
Defined in:
lib/rails3_artifactor/artifact/orm/data_mapper.rb

Instance Method Summary collapse

Methods included from Base

included

Instance Method Details

#field_nameObject



18
19
20
# File 'lib/rails3_artifactor/artifact/orm/data_mapper.rb', line 18

def field_name
  'property'
end

#new_model_content(name, options = {}, &block) ⇒ Object



13
14
15
16
# File 'lib/rails3_artifactor/artifact/orm/data_mapper.rb', line 13

def new_model_content name, options={}, &block        
  content = block ? yield : options[:content]
  file_w_include(name, orm_marker_name(name, options)) { content }
end

#orm_marker_name(name, options = nil) ⇒ Object



9
10
11
# File 'lib/rails3_artifactor/artifact/orm/data_mapper.rb', line 9

def orm_marker_name name, options=nil
  "#{orm_name}::Resource"
end

#orm_nameObject



5
6
7
# File 'lib/rails3_artifactor/artifact/orm/data_mapper.rb', line 5

def orm_name
  'DataMapper'
end