Class: Bake::Modernize::License::Authorship::Copyright
- Inherits:
-
Struct
- Object
- Struct
- Bake::Modernize::License::Authorship::Copyright
- Defined in:
- lib/bake/modernize/license.rb
Overview
Represents the copyright for an author.
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#dates ⇒ Object
Returns the value of attribute dates.
Instance Method Summary collapse
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author
195 196 197 |
# File 'lib/bake/modernize/license.rb', line 195 def @author end |
#dates ⇒ Object
Returns the value of attribute dates
195 196 197 |
# File 'lib/bake/modernize/license.rb', line 195 def dates @dates end |
Instance Method Details
#<=>(other) ⇒ Object
196 197 198 |
# File 'lib/bake/modernize/license.rb', line 196 def <=> other self.to_a <=> other.to_a end |
#statement ⇒ Object
200 201 202 203 204 |
# File 'lib/bake/modernize/license.rb', line 200 def statement years = self.dates.map(&:year).uniq period = .end_with?(".") ? "" : "." return "Copyright, #{years.join('-')}, by #{}#{period}" end |