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
36 37 38 |
# File 'lib/jets/commands/call/guesser.rb', line 36 def initialize(provided_function_name) @provided_function_name = provided_function_name end |
Instance Method Details
#delegate_guesser ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/jets/commands/call/guesser.rb', line 40 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 |