Class: UffizziCore::ComposeFile::Parsers::Services::EnvironmentParserService
- Inherits:
-
Object
- Object
- UffizziCore::ComposeFile::Parsers::Services::EnvironmentParserService
- Extended by:
- VariablesParserService
- Defined in:
- app/services/uffizzi_core/compose_file/parsers/services/environment_parser_service.rb
Class Method Summary collapse
Class Method Details
.parse(environment) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/services/uffizzi_core/compose_file/parsers/services/environment_parser_service.rb', line 7 def parse(environment) return [] if environment.blank? case environment when Array environment.map { |variable| parse_variable_from_string(variable) } when Hash environment.to_a.map { |variable| parse_variable_from_array(variable) } else raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.invalid_type', option: :environment) end end |