summaryrefslogtreecommitdiff
path: root/lib/oxidized/config/vars.rb
blob: bc94049bb456d6a76b44c17229ba8ebfdd013454 (plain)
1
2
3
4
5
6
7
8
9
10
module Oxidized::Config::Vars
  # convenience method for accessing node, group or global level user variables
  # nil values will be ignored
  def vars name
    r =   @node.vars[name]
    r ||= CFG.groups[@node.group].vars[name.to_s] if CFG.groups.has_key?(@node.group)
    r ||= CFG.vars[name.to_s]
  end
end