Class: GemRelease::License

Inherits:
Template show all
Defined in:
lib/gem_release/license.rb

Instance Attribute Summary collapse

Attributes inherited from Template

#filename, #module_names, #module_path, #name, #template

Instance Method Summary collapse

Methods inherited from Template

#write

Methods included from Helpers

#gem_filename, #gem_name, #gem_name_from_directory, #gem_version, #gemspec, #gemspec_dirs, #gemspec_filename, #github_token, #github_user, #in_bootstrapped_dir, #in_gemspec_dirs, #quiet?, #user_email, #user_name

Constructor Details

#initialize(options = {}) ⇒ License

Returns a new instance of License.



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

def initialize(options = {})
  super

  @author  ||= user_name
  @email   ||= user_email
  @year    ||= Time.now.year
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



3
4
5
# File 'lib/gem_release/license.rb', line 3

def author
  @author
end

#emailObject (readonly)

Returns the value of attribute email.



3
4
5
# File 'lib/gem_release/license.rb', line 3

def email
  @email
end

#yearObject (readonly)

Returns the value of attribute year.



3
4
5
# File 'lib/gem_release/license.rb', line 3

def year
  @year
end

Instance Method Details

#template_nameObject



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

def template_name
  'gemspec.erb'
end