Class: Merb::Generators::HelperGenerator

Inherits:
ComponentGenerator show all
Defined in:
lib/merb-gen/helper.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/helper.rb', line 5

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

Instance Method Details

#file_nameObject



39
40
41
# File 'lib/merb-gen/helper.rb', line 39

def file_name
  helper_class_name.snake_case
end

#full_class_nameObject



35
36
37
# File 'lib/merb-gen/helper.rb', line 35

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

#helper_class_nameObject



31
32
33
# File 'lib/merb-gen/helper.rb', line 31

def helper_class_name
  chunks.last
end

#helper_modulesObject



27
28
29
# File 'lib/merb-gen/helper.rb', line 27

def helper_modules
  chunks[0..-2]
end