instance method lookup_class

Ruby on Rails 2.3.18

Last seen in v2.3.18 Private — implementation detail, not part of the public API

Available in: v2.2.3 v2.3.18

Signature

lookup_class()

Search for the first Class descending from Rails::Generator::Base whose name matches the requested class name.

Source
# File railties/lib/rails_generator/spec.rb, line 35
        def lookup_class
          ObjectSpace.each_object(Class) do |obj|
            return obj if obj.ancestors.include?(Rails::Generator::Base) and
                          obj.name.split('::').last == class_name
          end
          raise NameError, "Missing #{class_name} class in #{class_file}"
        end

Defined in railties/lib/rails_generator/spec.rb line 35 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generator::Spec

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close