Class: GitlabInternalEventsCli::NewEvent
- Inherits:
-
Struct
- Object
- Struct
- GitlabInternalEventsCli::NewEvent
- Defined in:
- lib/gitlab_internal_events_cli/event.rb
Instance Method Summary collapse
Instance Method Details
#bulk_assign(key_value_pairs) ⇒ Object
59 60 61 |
# File 'lib/gitlab_internal_events_cli/event.rb', line 59 def bulk_assign(key_value_pairs) key_value_pairs.each { |key, value| self[key] = value } end |
#file_path ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/gitlab_internal_events_cli/event.rb', line 48 def file_path File.join( *[ ('ee' unless tiers.include?('free')), 'config', 'events', "#{action}.yml" ].compact ) end |
#formatted_output ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/gitlab_internal_events_cli/event.rb', line 40 def formatted_output EVENT_DEFAULTS .merge(to_h.compact) .slice(*NEW_EVENT_FIELDS) .transform_keys(&:to_s) .to_yaml(line_width: 150) end |