Sha256: 7f2195f8ae4ee5c1591f399ad8f4d4f8d85bffca5f0bc00a0fe3eb4936033100

Contents?: true

Size: 345 Bytes

Versions: 6

Compression:

Stored size: 345 Bytes

Contents

module PushType
  class NodeGenerator < Rails::Generators::NamedBase
    source_root File.expand_path('../templates', __FILE__)

    def create_model
      template 'node.rb', "app/models/#{ file_name }.rb"
      template 'template.html.erb', "app/views/nodes/#{ file_name }.html.erb"
    end

    hook_for :test_framework, as: :model
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
push_type_core-0.2.1 lib/generators/push_type/node/node_generator.rb
push_type_core-0.2.0 lib/generators/push_type/node/node_generator.rb
push_type_core-0.2.0.beta2 lib/generators/push_type/node/node_generator.rb
push_type_core-0.1.1 lib/generators/push_type/node/node_generator.rb
push_type_core-0.1.0 lib/generators/push_type/node/node_generator.rb
push_type_core-0.1.0.beta3 lib/generators/push_type/node/node_generator.rb