Class: Merb::Generators::PartControllerGenerator

Inherits:
ComponentGenerator show all
Defined in:
lib/merb-gen/part_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Generator

#initialize, #with_modules

Constructor Details

This class inherits a constructor from Merb::Generators::Generator

Class Method Details

.source_rootObject



5
6
7
# File 'lib/merb-gen/part_controller.rb', line 5

def self.source_root
  File.join(super, 'part_controller')
end

Instance Method Details

#controller_class_nameObject



33
34
35
# File 'lib/merb-gen/part_controller.rb', line 33

def controller_class_name
  chunks.last
end

#controller_modulesObject



29
30
31
# File 'lib/merb-gen/part_controller.rb', line 29

def controller_modules
  chunks[0..-2]
end

#file_nameObject



41
42
43
# File 'lib/merb-gen/part_controller.rb', line 41

def file_name
  controller_class_name.snake_case
end

#full_class_nameObject



37
38
39
# File 'lib/merb-gen/part_controller.rb', line 37

def full_class_name
  chunks.join('::')
end