Class: Datatable::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/datatable/generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Generator

Returns a new instance of Generator.



5
6
7
8
# File 'lib/datatable/generator.rb', line 5

def initialize(name)
  @name = name
  @dirname = 'app/datatables'
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/datatable/generator.rb', line 3

def name
  @name
end

Instance Method Details

#templatesObject



17
18
19
# File 'lib/datatable/generator.rb', line 17

def templates
  Datatable.templates
end

#upObject



10
11
12
13
14
15
# File 'lib/datatable/generator.rb', line 10

def up
  # The first is to create folder in case it does not exist.
  create_folder
  create_principal
  create_file
end