Skip to content

Instantly share code, notes, and snippets.

@rdark
Created March 20, 2014 09:12
Show Gist options
  • Save rdark/9659984 to your computer and use it in GitHub Desktop.
Save rdark/9659984 to your computer and use it in GitHub Desktop.
rclark@mercury:~$ ./tmp/test_yaml.rb ./tmp/test_yaml.yml
yaml is a Hash
{"ulimit"=>{"user"=>nil, "ulimit_config"=>[{"domain"=>"a", "type"=>"a", "item"=>"a", "value"=>0}, {"domain"=>"b", "type"=>"b", "item"=>"b", "value"=>1}]}}
rclark@mercury:~$ cat tmp/test_yaml.rb
#!/usr/bin/env ruby
require 'yaml'
yaml = YAML::load(File.open(ARGV[0]))
puts "yaml is a #{yaml.class.name}"
puts yaml.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment