Commit 822efd5c authored by Lin Jen-Shin's avatar Lin Jen-Shin

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

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_15091858
parent 27a3f118
...@@ -79,8 +79,7 @@ module Gitlab ...@@ -79,8 +79,7 @@ module Gitlab
module PipelineDuration module PipelineDuration
extend self extend self
PeriodStruct = Struct.new(:first, :last) Period = Struct.new(:first, :last) do
class Period < PeriodStruct
def duration def duration
last - first last - first
end 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