Object
# File lib/rbatch/run_conf.rb, line 84 def[](key) if @opt[key].nil? raise RBatch::RunConf::Exception, "Value of key=\"#{key}\" is nil" end @opt[key] end
# File lib/rbatch/run_conf.rb, line 91 def[]=(key,value) if ! @opt.has_key?(key) raise RBatch::RunConf::Exception, "Key=\"#{key}\" does not exist" end @opt[key]=value end
# File lib/rbatch/run_conf.rb, line 58 def has_key?(key) @opt.has_key?(key) end
# File lib/rbatch/run_conf.rb, line 40 def load() begin @yaml = YAML::load_file(@path) rescue # when run_conf does not exist, do nothing. @yaml = false end if @yaml @yaml.each_key do |key| if @@def_opt.has_key?(key.to_sym) @opt[key.to_sym]=@yaml[key] else raise RBatch::RunConf::Exception, "\"#{key}\" is not available option" end end end end
Generated with the Darkfish Rdoc Generator 2.