Class: Merb::Generators::ControllerGenerator
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Generator
#initialize, #with_modules
Class Method Details
.source_root ⇒ Object
5
6
7
|
# File 'lib/merb-gen/controller.rb', line 5
def self.source_root
File.join(super, 'controller')
end
|
Instance Method Details
#controller_class_name ⇒ Object
43
44
45
|
# File 'lib/merb-gen/controller.rb', line 43
def controller_class_name
chunks.last
end
|
#controller_modules ⇒ Object
39
40
41
|
# File 'lib/merb-gen/controller.rb', line 39
def controller_modules
chunks[0..-2]
end
|
#file_name ⇒ Object
55
56
57
|
# File 'lib/merb-gen/controller.rb', line 55
def file_name
controller_class_name.snake_case
end
|
#full_class_name ⇒ Object
47
48
49
|
# File 'lib/merb-gen/controller.rb', line 47
def full_class_name
chunks.join('::')
end
|
#test_class_name ⇒ Object
51
52
53
|
# File 'lib/merb-gen/controller.rb', line 51
def test_class_name
controller_class_name + "Test"
end
|