Class: Datatable::Generator
- Inherits:
-
Object
- Object
- Datatable::Generator
- Defined in:
- lib/datatable/generator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Generator
constructor
A new instance of Generator.
- #templates ⇒ Object
- #up ⇒ Object
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
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/datatable/generator.rb', line 3 def name @name end |
Instance Method Details
#templates ⇒ Object
17 18 19 |
# File 'lib/datatable/generator.rb', line 17 def templates Datatable.templates end |
#up ⇒ Object
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 |