Class: Bowline::Generators::NamedGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/bowline/generators.rb

Instance Method Summary (collapse)

Methods inherited from Generator

chmod, #shebang, source_root, touch, #with_modules

Constructor Details

- (NamedGenerator) initialize(*args)



115
116
117
# File 'lib/bowline/generators.rb', line 115

def initialize(*args)
  super
end

Instance Method Details

- (Object) class_name Also known as: module_name



119
120
121
# File 'lib/bowline/generators.rb', line 119

def class_name
  name.gsub('-', '_').camel_case
end

- (Object) file_name Also known as: base_name



124
125
126
# File 'lib/bowline/generators.rb', line 124

def file_name
  name.snake_case
end

- (Object) symbol_name



129
130
131
# File 'lib/bowline/generators.rb', line 129

def symbol_name
  file_name.gsub('-', '_')
end