Class: OpenSource::License::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/open_source/license/generator.rb

Instance Method Summary collapse

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(options)
  @options = options
  @owner = Owner.new
  @license = ERB.new(File.read("#{File.expand_path("../templates", __FILE__)}/#{@options[:license]}.erb"))
end

Instance Method Details

#generateObject



12
13
14
15
# File 'lib/open_source/license/generator.rb', line 12

def generate
  create_license_file
  append_to_file if @options[:append]
end