Class: Jdt::Generator
- Inherits:
-
Thor
- Object
- Thor
- Jdt::Generator
- Includes:
- Thor::Actions
- Defined in:
- lib/jdt/generator/generator.rb
Direct Known Subclasses
ComponentGenerator, LanguageGenerator, LibraryGenerator, ModuleGenerator, PluginGenerator, TemplateGenerator
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#creation_date ⇒ Object
Returns the value of attribute creation_date.
-
#description ⇒ Object
Returns the value of attribute description.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
-
.source_root ⇒ Object
include templates directory.
Instance Method Summary collapse
-
#initialize(name) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(name) ⇒ Generator
Returns a new instance of Generator.
20 21 22 23 24 25 26 27 |
# File 'lib/jdt/generator/generator.rb', line 20 def initialize(name) @name = name @version = "0.0.1" @author = "AUTHOR" @description = "DESCRIPTION" @creation_date = "#{Date::MONTHNAMES[Time.now.month]} #{Time.now.year}" @location = "." end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
18 19 20 |
# File 'lib/jdt/generator/generator.rb', line 18 def @author end |
#creation_date ⇒ Object
Returns the value of attribute creation_date.
18 19 20 |
# File 'lib/jdt/generator/generator.rb', line 18 def creation_date @creation_date end |
#description ⇒ Object
Returns the value of attribute description.
18 19 20 |
# File 'lib/jdt/generator/generator.rb', line 18 def description @description end |
#location ⇒ Object
Returns the value of attribute location.
18 19 20 |
# File 'lib/jdt/generator/generator.rb', line 18 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/jdt/generator/generator.rb', line 18 def name @name end |
Class Method Details
.source_root ⇒ Object
include templates directory
14 15 16 |
# File 'lib/jdt/generator/generator.rb', line 14 def self.source_root File.dirname(__FILE__) end |