Class: Types::Analytics::CycleAnalytics::ValueStreams::StageItemsType

Inherits:
BaseObject
  • Object
show all
Includes:
EntityDateHelper
Defined in:
app/graphql/types/analytics/cycle_analytics/value_streams/stage_items_type.rb

Overview

rubocop: disable Graphql/AuthorizeTypes – # Already authorized in parent.

Instance Method Summary collapse

Methods included from EntityDateHelper

#distance_of_time_as_hash, #interval_in_words, #remaining_days_in_words

Methods inherited from BaseObject

accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#durationObject



28
29
30
31
32
33
34
# File 'app/graphql/types/analytics/cycle_analytics/value_streams/stage_items_type.rb', line 28

def duration
  return unless object.total_time.present?

  duration_array = distance_of_time_as_hash(object.total_time.to_f).first

  duration_array.reverse.join(' ')
end

#recordObject



36
37
38
# File 'app/graphql/types/analytics/cycle_analytics/value_streams/stage_items_type.rb', line 36

def record
  object
end