Class: Merb::Generators::ThinSliceGenerator

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

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

Instance Method Details

#base_nameObject Also known as: underscored_name



17
18
19
# File 'lib/merb-gen/slice/thin.rb', line 17

def base_name
  self.name.snake_case
end

#destination_rootObject



23
24
25
# File 'lib/merb-gen/slice/thin.rb', line 23

def destination_root
  File.join(@destination_root, base_name)
end

#module_nameObject



13
14
15
# File 'lib/merb-gen/slice/thin.rb', line 13

def module_name
  self.name.camel_case
end