Class: Opensource::License

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ License

Returns a new instance of License.



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

def initialize(options)
  @options = options
  @user = Owner.get_credentials
  @user['escaped_email'] = "<#{@user['email']}>"
  @license = ERB.new(File.read("#{File.expand_path("../../../templates", __FILE__)}/#{@options[:license]}.erb")).result(binding)
end

Instance Method Details

#processObject



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

def process
  generate
  append if @options[:append]
end