Sha256: 9353457366e5137a6400d1a01e7ae70d7bf32e255e5ad7f8f801f4f923ccecca

Contents?: true

Size: 374 Bytes

Versions: 4

Compression:

Stored size: 374 Bytes

Contents

module Machinist
  module Generators #:nodoc:
    class ModelGenerator < Rails::Generators::NamedBase #:nodoc:
      argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"

      def create_blueprint
        append_file "spec/support/blueprints.rb", "\n#{class_name}.blueprint do\n  # Attributes here\nend\n"
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
machinist-2.0 lib/generators/machinist/model/model_generator.rb
indirect-machinist-2.0.0.beta3 lib/generators/machinist/model/model_generator.rb
machinist-2.0.0.beta2 lib/generators/machinist/model/model_generator.rb
machinist-2.0.0.beta1 lib/generators/machinist/model/model_generator.rb