Sha256: 6b1d94b39c417785a7c1dd6abed36e3d1ca5955b0e68242d05969856eaedeb08

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

module Interpret

  class ViewsGenerator < Rails::Generators::Base
    source_root File.expand_path("../../../../app/views", __FILE__)
    desc "Copies all Interpret views to your application."

    argument :scope, :required => false, :default => nil,
                      :desc => "The scope to copy views to"

    def copy_views
      scope ||=  Interpret.controller.split("/").first
      directory "interpret", "app/views/#{scope}"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
interpret-0.1.3 lib/generators/interpret/views_generator.rb
interpret-0.1.2 lib/generators/interpret/views_generator.rb
interpret-0.1.1 lib/generators/interpret/views_generator.rb