method
builder
v3.0.9 -
Show latest stable
- Class:
Rails::Generators::AppGenerator
builder()protected
No documentation available.
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 316
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