Sha256: ac493713b3da20c21112096596f075e2e13a786f7d122c78ba94f3e23928fc45

Contents?: true

Size: 411 Bytes

Versions: 15

Compression:

Stored size: 411 Bytes

Contents

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] unless @node.vars.nil?
    r ||= Oxidized::CFG.groups[@node.group].vars[name.to_s] if Oxidized::CFG.groups.has_key?(@node.group)
    r ||= Oxidized::CFG.vars[name.to_s] if Oxidized::CFG.vars.has_key?(name.to_s)
    r
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
oxidized-0.9.0 lib/oxidized/config/vars.rb
oxidized-0.8.1 lib/oxidized/config/vars.rb
oxidized-0.8.0 lib/oxidized/config/vars.rb
oxidized-0.7.2 lib/oxidized/config/vars.rb
oxidized-0.7.1 lib/oxidized/config/vars.rb
oxidized-0.7.0 lib/oxidized/config/vars.rb
oxidized-0.6.0 lib/oxidized/config/vars.rb
oxidized-0.5.0 lib/oxidized/config/vars.rb
oxidized-0.4.1 lib/oxidized/config/vars.rb
oxidized-0.4.0 lib/oxidized/config/vars.rb
oxidized-0.3.0 lib/oxidized/config/vars.rb
oxidized-0.2.4 lib/oxidized/config/vars.rb
oxidized-0.2.3 lib/oxidized/config/vars.rb
oxidized-0.2.2 lib/oxidized/config/vars.rb
oxidized-0.2.1 lib/oxidized/config/vars.rb