Skip to content
Snippets Groups Projects
Commit 822efd5c authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Struct.new could take a block for defining methods, feedback:

parent 27a3f118
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -79,8 +79,7 @@ module Gitlab
module PipelineDuration
extend self
 
PeriodStruct = Struct.new(:first, :last)
class Period < PeriodStruct
Period = Struct.new(:first, :last) do
def duration
last - first
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment