Class: Hiera::Scope
- Inherits:
-
Object
- Object
- Hiera::Scope
- Defined in:
- lib/hiera/scope.rb
Instance Attribute Summary collapse
-
#real ⇒ Object
readonly
Returns the value of attribute real.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #catalog ⇒ Object
- #compiler ⇒ Object
- #include?(key) ⇒ Boolean
-
#initialize(real) ⇒ Scope
constructor
A new instance of Scope.
- #resource ⇒ Object
Constructor Details
#initialize(real) ⇒ Scope
Returns a new instance of Scope.
5 6 7 |
# File 'lib/hiera/scope.rb', line 5 def initialize(real) @real = real end |
Instance Attribute Details
#real ⇒ Object (readonly)
Returns the value of attribute real.
3 4 5 |
# File 'lib/hiera/scope.rb', line 3 def real @real end |
Instance Method Details
#[](key) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/hiera/scope.rb', line 9 def [](key) ans = @real.lookupvar(key) # damn you puppet visual basic style variables. return nil if ans == "" return ans end |
#catalog ⇒ Object
21 22 23 |
# File 'lib/hiera/scope.rb', line 21 def catalog @real.catalog end |
#compiler ⇒ Object
29 30 31 |
# File 'lib/hiera/scope.rb', line 29 def compiler @real.compiler end |
#include?(key) ⇒ Boolean
17 18 19 |
# File 'lib/hiera/scope.rb', line 17 def include?(key) @real.lookupvar(key) != "" end |
#resource ⇒ Object
25 26 27 |
# File 'lib/hiera/scope.rb', line 25 def resource @real.resource end |