Method: Gitlab::CLI::Helpers.yaml_load
- Defined in:
- lib/gitlab/cli_helpers.rb
permalink .yaml_load(arg) ⇒ Object
YAML::load on a single argument
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 |