BigW Consortium Gitlab

Commit 822efd5c by Lin Jen-Shin

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

parent 27a3f118
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment