Class: UffizziCore::ComposeFile::Parsers::Services::EntrypointParserService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/compose_file/parsers/services/entrypoint_parser_service.rb

Class Method Summary collapse

Class Method Details

.parse(entrypoint_data) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/services/uffizzi_core/compose_file/parsers/services/entrypoint_parser_service.rb', line 5

def parse(entrypoint_data)
  return nil if entrypoint_data.blank?

  case entrypoint_data
  when String
    [entrypoint_data]
  when Array
    entrypoint_data
  else
    raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.invalid_type', option: :entrypoint)
  end
end