Class: Bowline::Generators::NamedGenerator

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

Instance Method Summary collapse

Methods inherited from Generator

source_root, #with_modules

Constructor Details

#initialize(*args) ⇒ NamedGenerator

Returns a new instance of NamedGenerator.



35
36
37
# File 'lib/bowline/generators.rb', line 35

def initialize(*args)
  super
end

Instance Method Details

#class_nameObject Also known as: module_name



39
40
41
# File 'lib/bowline/generators.rb', line 39

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

#file_nameObject Also known as: base_name



44
45
46
# File 'lib/bowline/generators.rb', line 44

def file_name
  name.snake_case
end

#symbol_nameObject



49
50
51
# File 'lib/bowline/generators.rb', line 49

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