Class: Bowline::Generators::NamedGenerator
Direct Known Subclasses
ApplicationGenerator, BinderGenerator, HelperGenerator, ModelGenerator, WindowGenerator
Instance Method Summary collapse
- #class_name ⇒ Object (also: #module_name)
- #file_name ⇒ Object (also: #base_name)
-
#initialize(*args) ⇒ NamedGenerator
constructor
A new instance of NamedGenerator.
- #symbol_name ⇒ Object
Methods inherited from Generator
chmod, #shebang, source_root, touch, #with_modules
Constructor Details
#initialize(*args) ⇒ NamedGenerator
Returns a new instance of NamedGenerator.
115 116 117 |
# File 'lib/bowline/generators.rb', line 115 def initialize(*args) super end |
Instance Method Details
#class_name ⇒ Object Also known as: module_name
119 120 121 |
# File 'lib/bowline/generators.rb', line 119 def class_name name.gsub('-', '_').camel_case end |
#file_name ⇒ Object Also known as: base_name
124 125 126 |
# File 'lib/bowline/generators.rb', line 124 def file_name name.snake_case end |
#symbol_name ⇒ Object
129 130 131 |
# File 'lib/bowline/generators.rb', line 129 def symbol_name file_name.gsub('-', '_') end |