class RSGem::Tasks::SetLicenseFile
Constants
- OUTPUT
Public Instance Methods
perform()
click to toggle source
# File lib/rsgem/tasks/set_license_file.rb, line 8 def perform license.gsub!( /.*Copyright.*/, "Copyright (c) #{Date.today.year} Rootstrap" ) write end
Private Instance Methods
license()
click to toggle source
# File lib/rsgem/tasks/set_license_file.rb, line 18 def license @license ||= File.read(context.license_path) end
write()
click to toggle source
# File lib/rsgem/tasks/set_license_file.rb, line 22 def write File.open(context.license_path, 'w') do |file| file.puts license end end