method

application_definition

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: Rails::Generators::PluginGenerator
application_definition() private

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/plugin_generator.rb, line 394
      def application_definition
        @application_definition ||= begin

          dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root)
          unless options[:pretend] || !File.exist?(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.