Flowdock
method

application_definition

Importance_0
v4.0.2 - Show latest stable - 0 notes - Class: PluginNewGenerator
application_definition() protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb, line 316
      def application_definition
        @application_definition ||= begin

          dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root)
          unless options[:pretend] || !File.exists?(dummy_application_path)
            contents = File.read(dummy_application_path)
            contents[(contents.index(/module ([\w]+)\n(.*)class Application/))..-1]
          end
        end
      end
Register or log in to add new notes.