Class: Mutations::Metrics::Dashboard::Annotations::Create::AnnotationSource
- Inherits:
-
Struct
- Object
- Struct
- Mutations::Metrics::Dashboard::Annotations::Create::AnnotationSource
- Defined in:
- app/graphql/mutations/metrics/dashboard/annotations/create.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object
48 49 50 |
# File 'app/graphql/mutations/metrics/dashboard/annotations/create.rb', line 48 def object @object end |
Instance Method Details
#klass ⇒ Object
53 54 55 |
# File 'app/graphql/mutations/metrics/dashboard/annotations/create.rb', line 53 def klass object.class.name end |
#type ⇒ Object
57 58 59 60 61 |
# File 'app/graphql/mutations/metrics/dashboard/annotations/create.rb', line 57 def type raise Gitlab::Graphql::Errors::ArgumentError, INVALID_ANNOTATION_SOURCE_ERROR unless type_keys[klass] type_keys[klass] end |
#type_keys ⇒ Object
49 50 51 |
# File 'app/graphql/mutations/metrics/dashboard/annotations/create.rb', line 49 def type_keys { 'Clusters::Cluster' => :cluster, 'Environment' => :environment } end |