Class: Jdt::Generator

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/jdt/generator/generator.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#authorObject

Returns the value of attribute author.



18
19
20
# File 'lib/jdt/generator/generator.rb', line 18

def author
  @author
end

#creation_dateObject

Returns the value of attribute creation_date.



18
19
20
# File 'lib/jdt/generator/generator.rb', line 18

def creation_date
  @creation_date
end

#descriptionObject

Returns the value of attribute description.



18
19
20
# File 'lib/jdt/generator/generator.rb', line 18

def description
  @description
end

#locationObject

Returns the value of attribute location.



18
19
20
# File 'lib/jdt/generator/generator.rb', line 18

def location
  @location
end

#nameObject

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_rootObject

include templates directory



14
15
16
# File 'lib/jdt/generator/generator.rb', line 14

def self.source_root
  File.dirname(__FILE__)
end