class CookbookOmnifetch::Integration
Public Class Methods
configurable(name)
click to toggle source
# File lib/cookbook-omnifetch/integration.rb, line 15 def self.configurable(name) configurables << name attr_writer name define_method(name) do value = instance_variable_get("@#{name}".to_sym) case value when NullValue raise MissingConfiguration, "`#{name}` is not configured" when Proc value.call else value end end end
configurables()
click to toggle source
# File lib/cookbook-omnifetch/integration.rb, line 11 def self.configurables @configurables ||= [] end
new()
click to toggle source
# File lib/cookbook-omnifetch/integration.rb, line 47 def initialize self.class.configurables.each do |configurable| instance_variable_set("@#{configurable}".to_sym, NullValue.new) end @chef_server_download_concurrency = 1 end