aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/rails/generators.rb52
1 files changed, 27 insertions, 25 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index 04f4908f52..e1980a42ad 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -274,38 +274,40 @@ module Rails
end
end
- def print_list(base, namespaces)
- namespaces = namespaces.reject { |n| hidden_namespaces.include?(n) }
- super
- end
+ private
- # Try fallbacks for the given base.
- def invoke_fallbacks_for(name, base) #:nodoc:
- return nil unless base && fallbacks[base.to_sym]
- invoked_fallbacks = []
+ def print_list(base, namespaces) # :doc:
+ namespaces = namespaces.reject { |n| hidden_namespaces.include?(n) }
+ super
+ end
- Array(fallbacks[base.to_sym]).each do |fallback|
- next if invoked_fallbacks.include?(fallback)
- invoked_fallbacks << fallback
+ # Try fallbacks for the given base.
+ def invoke_fallbacks_for(name, base)
+ return nil unless base && fallbacks[base.to_sym]
+ invoked_fallbacks = []
- klass = find_by_namespace(name, fallback)
- return klass if klass
- end
+ Array(fallbacks[base.to_sym]).each do |fallback|
+ next if invoked_fallbacks.include?(fallback)
+ invoked_fallbacks << fallback
- nil
- end
+ klass = find_by_namespace(name, fallback)
+ return klass if klass
+ end
- def command_type
- @command_type ||= "generator"
- end
+ nil
+ end
- def lookup_paths
- @lookup_paths ||= %w( rails/generators generators )
- end
+ def command_type # :doc:
+ @command_type ||= "generator"
+ end
- def file_lookup_paths
- @file_lookup_paths ||= [ "{#{lookup_paths.join(',')}}", "**", "*_generator.rb" ]
- end
+ def lookup_paths # :doc:
+ @lookup_paths ||= %w( rails/generators generators )
+ end
+
+ def file_lookup_paths # :doc:
+ @file_lookup_paths ||= [ "{#{lookup_paths.join(',')}}", "**", "*_generator.rb" ]
+ end
end
end
end