Class: Merb::Generators::NamespacedGenerator
Instance Method Summary
collapse
#initialize, #symbol_name, #test_class_name
Methods inherited from Generator
#go_up, #initialize, source_root, #with_modules
#error, #success, #warning
Instance Method Details
#base_path ⇒ Object
30
31
32
|
# File 'lib/merb-gen/namespaced_generator.rb', line 30
def base_path
File.join(*snake_cased_chunks[0..-2])
end
|
#class_name ⇒ Object
Also known as:
module_name
14
15
16
|
# File 'lib/merb-gen/namespaced_generator.rb', line 14
def class_name
chunks.last.gsub('-', '_').camel_case
end
|
#file_name ⇒ Object
Also known as:
base_name
20
21
22
|
# File 'lib/merb-gen/namespaced_generator.rb', line 20
def file_name
chunks.last.snake_case
end
|
#full_class_name ⇒ Object
26
27
28
|
# File 'lib/merb-gen/namespaced_generator.rb', line 26
def full_class_name
(modules + [class_name]).join('::')
end
|
#modules ⇒ Object
10
11
12
|
# File 'lib/merb-gen/namespaced_generator.rb', line 10
def modules
chunks[0..-2]
end
|