Class: Jdt::LibraryGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/jdt/generator/library_generator.rb

Instance Attribute Summary

Attributes inherited from Generator

#author, #creation_date, #description, #location, #name

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject

include templates directory



7
8
9
# File 'lib/jdt/generator/library_generator.rb', line 7

def self.source_root
  "#{File.dirname(__FILE__)}/templates/library"
end

Instance Method Details

#generate(name) ⇒ Object



11
12
13
14
15
16
# File 'lib/jdt/generator/library_generator.rb', line 11

def generate(name)
  super

  empty_directory("#{prefixed_name}/lib")
  template("entry.php","#{prefixed_name}/#{prefixed_name}.php")
end