Sha256: 5b0cea15dd57bbfe42f2f4c08d4599a9a0a495b122a6827d6b7ebe67dadb58e0
Contents?: true
Size: 1.81 KB
Versions: 3
Compression:
Stored size: 1.81 KB
Contents
o:$YARD::CodeObjects::MethodObject:@scope: instance:@parameters[[" since0: @name:copyright_years:@signature"Ndef copyright_years(since) raise ArgumentError, "Argument should be a number" unless since.is_a?(Integer) raise ArgumentError, "since should not be a future" if Date.civil(since).year > Date.today.year if Date.civil(since).year == Date.today.year since.to_s else "#{since}-#{Date.today.year}" end end:@source">def copyright_years(since) raise ArgumentError, "Argument should be a number" unless since.is_a?(Integer) raise ArgumentError, "since should not be a future" if Date.civil(since).year > Date.today.year if Date.civil(since).year == Date.today.year since.to_s else "#{since}-#{Date.today.year}" end end:@files[["lib/copyright_helper.rbi:@docstringIC:YARD::Docstring"&Returns copyright period in years :@objectu:YARD::StubProxy$CopyrightHelper#copyright_years: @all["&Returns copyright period in years"2@example When the argument is the year of now"' copyright_years(2009) #=> "2009""6@example When the argument if before of this year", copyright_years(1997) #=> "1997-2009""@param [#is_a?(Integer)]:@line_rangeo: Range: begini: exclF:endi:@ref_tags[ : @tags[ o:YARD::Tags::Tag : @text"' copyright_years(2009) #=> "2009"; ")When the argument is the year of now;u;$CopyrightHelper#copyright_years:@types0:@tag_name"exampleo; ;", copyright_years(1997) #=> "1997-2009"; "-When the argument if before of this year;u;$CopyrightHelper#copyright_years;0;"exampleo; ;0; 0;u;$CopyrightHelper#copyright_years;["#is_a?(Integer);" paramo; ;"