Sha256: a44e0b3193b16b33abccbd49e2d4e18f080d8aba6d93d5a979379e1564670ac5
Contents?: true
Size: 544 Bytes
Versions: 29
Compression:
Stored size: 544 Bytes
Contents
module Cody module Variables def load_variables load_variables_file("base") load_variables_file(Cody.env) # Then load type scope variables, so they take higher precedence load_variables_file("base", @options[:type]) load_variables_file(Cody.env, @options[:type]) end def load_variables_file(filename, type=nil) items = ["#{Cody.root}/.cody", type, "variables/#{filename}.rb"].compact path = items.join('/') instance_eval(IO.read(path), path) if File.exist?(path) end end end
Version data entries
29 entries across 29 versions & 1 rubygems