Class: License::LicenseObject

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

Instance Method Summary collapse

Constructor Details

#initialize(license, outfile = "LICENSE") ⇒ LicenseObject



5
6
7
8
# File 'lib/license/license.rb', line 5

def initialize(license, outfile = "LICENSE")
	@license =  license
	@outfile = outfile
end

Instance Method Details

#parse_licenseObject



10
11
12
13
14
15
16
17
# File 'lib/license/license.rb', line 10

def parse_license
	if License::LICENSES.include? @license
		FileUtils.cp("data/#{@license}", "#{@outfile}")
	else
		puts "Unsupported license please use --list to show all supported licenses"
		exit
	end
end