Class: ObjectifyModelGenerator

Inherits:
BaseScaffold show all
Defined in:
lib/vraptor-scaffold/generators/scaffold/model_generator/objectify_model_generator.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from BaseScaffold

#base_path, #class_name, #controller_class_name, #controller_test_class_name, #controller_test_param, #imports, #initialize, #model_parameter_name, #repository_impl_name, #repository_interface_name, #repository_test_class_name, #test_class_name

Constructor Details

This class inherits a constructor from BaseScaffold

Class Method Details

+ (Object) source_root



3
4
5
# File 'lib/vraptor-scaffold/generators/scaffold/model_generator/objectify_model_generator.rb', line 3

def self.source_root
  File.join File.dirname(__FILE__), "templates"
end

Instance Method Details

- (Object) build



7
8
9
10
11
# File 'lib/vraptor-scaffold/generators/scaffold/model_generator/objectify_model_generator.rb', line 7

def build
  template("objectify_model.erb", Configuration.main_class_path(Configuration.models_package, "#{class_name}.java"))
  template("model_test.erb", Configuration.test_class_path(Configuration.models_package, "#{test_class_name}.java"))
  map_model_class
end