Sha256: ead63692ba3d17ab0219232dfb2c5178737b3874e3dccbb83a64cd0e74dc3983
Contents?: true
Size: 745 Bytes
Versions: 2
Compression:
Stored size: 745 Bytes
Contents
require 'rails/generators/resource_helpers' require 'generators/resty/base' module Resty module Generators class ModelGenerator < Base source_root File.expand_path('../../templates', __FILE__) argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" if defined? ::Ixtlan::ModifiedBy class_option :modified_by, :type => :boolean end class_option :timestamps, :type => :boolean class_option :parent, :type => :string, :desc => "The parent class for the generated model" def create_model_file template 'Model.java', File.join(java_root, models_base_package.gsub(/\./, "/"), class_path, "#{class_name}.java") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
resty-generators-0.2.0 | lib/generators/resty/model/model_generator.rb |
resty-generators-0.1.0 | lib/generators/resty/model/model_generator.rb |