Method: Gitlab::CLI::Helpers.yaml_load

Defined in:
lib/gitlab/cli_helpers.rb

.yaml_load(arg) ⇒ Object

YAML::load on a single argument

[View source]

237
238
239
240
241
# File 'lib/gitlab/cli_helpers.rb', line 237

def yaml_load(arg)
  hex_color?(arg) ? arg : YAML.safe_load(arg)
rescue Psych::SyntaxError
  raise "Error: Argument is not valid YAML syntax: #{arg}"
end