module LVM::Attributes
Constants
- VERSION
Public Class Methods
load(version, name)
click to toggle source
# File lib/lvm/attributes.rb, line 7 def load(version, name) cwd = __dir__ # was going to be symlinks, but rubygems didn't seem to want to package # them if version == "2.02.28" version = "2.02.27" elsif ((31..39).map { |x| "2.02.#{x}" }).include?(version) version = "2.02.30" end file = File.join(cwd, "attributes", version, name) begin YAML.load_file(file) rescue Errno::ENOENT => e raise ArgumentError.new("Unable to load lvm attributes [#{name}] for version [#{version}]. " \ "The version/object may not be supported or you may need to upgrade the chef-ruby-lvm-attrib gem. Error [#{e.message}]") end end
Private Instance Methods
load(version, name)
click to toggle source
# File lib/lvm/attributes.rb, line 7 def load(version, name) cwd = __dir__ # was going to be symlinks, but rubygems didn't seem to want to package # them if version == "2.02.28" version = "2.02.27" elsif ((31..39).map { |x| "2.02.#{x}" }).include?(version) version = "2.02.30" end file = File.join(cwd, "attributes", version, name) begin YAML.load_file(file) rescue Errno::ENOENT => e raise ArgumentError.new("Unable to load lvm attributes [#{name}] for version [#{version}]. " \ "The version/object may not be supported or you may need to upgrade the chef-ruby-lvm-attrib gem. Error [#{e.message}]") end end