Class: OpenSource::License::Generator
- Inherits:
-
Object
- Object
- OpenSource::License::Generator
- Defined in:
- lib/open_source/license/generator.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(options) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(options) ⇒ Generator
Returns a new instance of Generator.
6 7 8 9 10 |
# File 'lib/open_source/license/generator.rb', line 6 def initialize() = @owner = Owner.new @license = ERB.new(File.read("#{File.expand_path("../templates", __FILE__)}/#{@options[:license]}.erb")) end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 |
# File 'lib/open_source/license/generator.rb', line 12 def generate create_license_file append_to_file if [:append] end |