class Ruth::Gemfile::Yaml
YAML suppoer for Ruth
Attributes
yaml[RW]
Public Class Methods
new(yaml)
click to toggle source
Calls superclass method
Ruth::Gemfile::Hash::new
# File lib/ruth/yaml.rb, line 9 def initialize(yaml) super() @yaml = yaml @data = parse_yaml end
Private Instance Methods
parse_yaml()
click to toggle source
Private - Read YAML file
Return Hash
# File lib/ruth/yaml.rb, line 21 def parse_yaml if File.exist?(@yaml) @data = YAML.load_file(@yaml) else @data = YAML.load(@yaml) end end