Class: Bake::Modernize::License::Authorship::Modification

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

Overview

Represents a modification to a file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorObject

Returns the value of attribute author

Returns:

  • (Object)

    the current value of author



166
167
168
# File 'lib/bake/modernize/license.rb', line 166

def author
  @author
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



166
167
168
# File 'lib/bake/modernize/license.rb', line 166

def id
  @id
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



166
167
168
# File 'lib/bake/modernize/license.rb', line 166

def path
  @path
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



166
167
168
# File 'lib/bake/modernize/license.rb', line 166

def time
  @time
end

Instance Method Details

#full_nameObject



167
168
169
# File 'lib/bake/modernize/license.rb', line 167

def full_name
	author[:name]
end

#keyObject



171
172
173
# File 'lib/bake/modernize/license.rb', line 171

def key
	self.id || "#{self.author[:email]}:#{self.time.iso8601}"
end

#to_hObject



175
176
177
178
179
180
181
182
# File 'lib/bake/modernize/license.rb', line 175

def to_h
	{
		id: id,
		time: time,
		path: path,
		author: author,
	}
end