Class: Merb::Generators::NamedGenerator
- Inherits:
-
Generator
- Object
- Templater::Generator
- Generator
- Merb::Generators::NamedGenerator
show all
- Defined in:
- lib/merb-gen/named_generator.rb
Instance Method Summary
collapse
Methods inherited from Generator
#go_up, source_root, #with_modules
#error, #success, #warning
Constructor Details
Returns a new instance of NamedGenerator.
9
10
11
|
# File 'lib/merb-gen/named_generator.rb', line 9
def initialize(*args)
super
end
|
Instance Method Details
#class_name ⇒ Object
Also known as:
module_name
13
14
15
|
# File 'lib/merb-gen/named_generator.rb', line 13
def class_name
name.gsub('-', '_').camel_case
end
|
#file_name ⇒ Object
Also known as:
base_name
23
24
25
|
# File 'lib/merb-gen/named_generator.rb', line 23
def file_name
name.snake_case
end
|
#symbol_name ⇒ Object
29
30
31
|
# File 'lib/merb-gen/named_generator.rb', line 29
def symbol_name
file_name.gsub('-', '_')
end
|
#test_class_name ⇒ Object
19
20
21
|
# File 'lib/merb-gen/named_generator.rb', line 19
def test_class_name
class_name + "Test"
end
|