Class: Gitlab::Ci::Pipeline::Duration::Period

Inherits:
Struct
  • Object
show all
Defined in:
lib/gitlab/ci/pipeline/duration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#firstObject

Returns the value of attribute first

Returns:

  • (Object)

    the current value of first


85
86
87
# File 'lib/gitlab/ci/pipeline/duration.rb', line 85

def first
  @first
end

#lastObject

Returns the value of attribute last

Returns:

  • (Object)

    the current value of last


85
86
87
# File 'lib/gitlab/ci/pipeline/duration.rb', line 85

def last
  @last
end

Instance Method Details

#durationObject


86
87
88
# File 'lib/gitlab/ci/pipeline/duration.rb', line 86

def duration
  last - first
end