Flowdock
method

builder

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: Rails::Generators::AppGenerator
builder() 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/app/app_generator.rb, line 317
      def builder
        @builder ||= begin
          if path = options[:builder]
            if URI(path).is_a?(URI::HTTP)
              contents = open(path, "Accept" => "application/x-thor-template") {|io| io.read }
            else
              contents = open(File.expand_path(path, @original_wd)) {|io| io.read }
            end

            prok = eval("proc { #{contents} }", TOPLEVEL_BINDING, path, 1)
            instance_eval(&prok)
          end

          builder_class = defined?(::AppBuilder) ? ::AppBuilder : Rails::AppBuilder
          builder_class.send(:include, ActionMethods)
          builder_class.new(self)
        end
      end
Register or log in to add new notes.