Class: Jets::Commands::Call::Guesser
- Inherits:
-
Object
- Object
- Jets::Commands::Call::Guesser
- Defined in:
- lib/jets/commands/call/guesser.rb
Instance Method Summary collapse
- #delegate_guesser ⇒ Object
-
#initialize(provided_function_name) ⇒ Guesser
constructor
Example of provided_function_name: admin/related_pages_controller-list_all admin-related-pages-controller-list-all.
Constructor Details
#initialize(provided_function_name) ⇒ Guesser
Example of provided_function_name:
admin/-list_all
admin--pages-controller-list-all
39 40 41 |
# File 'lib/jets/commands/call/guesser.rb', line 39 def initialize(provided_function_name) @provided_function_name = provided_function_name end |
Instance Method Details
#delegate_guesser ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/jets/commands/call/guesser.rb', line 43 def delegate_guesser @delegate_guesser ||= if @provided_function_name =~ /[-_](controller|job|rule)/ AutoloadGuesser.new(@provided_function_name) else AnonymousGuesser.new(@provided_function_name) end end |