Class: Jets::Commands::Call::BaseGuesser
- Inherits:
-
Object
- Object
- Jets::Commands::Call::BaseGuesser
show all
- Defined in:
- lib/jets/commands/call/base_guesser.rb
Instance Method Summary
collapse
Constructor Details
#initialize(provided_function_name) ⇒ BaseGuesser
provided_function_name:
admin/related_pages_controller-list_all
admin-related-pages-controller-list-all
11
12
13
|
# File 'lib/jets/commands/call/base_guesser.rb', line 11
def initialize(provided_function_name)
@provided_function_name = provided_function_name
end
|
Instance Method Details
#class_name ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/jets/commands/call/base_guesser.rb', line 15
def class_name
return @class_name if @detection_ran
@class_name = detect_class_name
@detection_ran = true
@class_name
end
|
#function_name ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/jets/commands/call/base_guesser.rb', line 23
def function_name
@provided_function_name = @provided_function_name.sub("#{Jets.config.project_namespace}-", "")
code_path = class_name.underscore.gsub('/','-')
function_name = [Jets.config.project_namespace, code_path, method_name].join('-')
end
|