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

#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_nameObject Also known as: module_name



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

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

#file_nameObject Also known as: base_name



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

def file_name
  name.snake_case
end

#symbol_nameObject



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

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