Sha256: b386e5bf2183d5a1633cc46c5eac71c72e9ab7edf342256459312bad2686012a
Contents?: true
Size: 824 Bytes
Versions: 32
Compression:
Stored size: 824 Bytes
Contents
module Gitlab module Triage module CommandBuilders class BaseCommandBuilder def initialize(items, resource: nil, network: nil) @items = Array.wrap(items) @items.delete('') @resource = resource&.with_indifferent_access @network = network end def build_command if items.any? [slash_command_string, content_string].compact.join(separator) else "" end end private attr_reader :items, :resource, :network def separator ' ' end def slash_command_string nil end def content_string items.map do |item| format_item(item) end.join(separator) end end end end end
Version data entries
32 entries across 32 versions & 2 rubygems