Class: XymonClient::ERBContext
- Inherits:
-
Object
- Object
- XymonClient::ERBContext
- Defined in:
- lib/xymonclient/helpers.rb
Overview
Class container for isolating context for ERB templating
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(hash) ⇒ ERBContext
constructor
A new instance of ERBContext.
Constructor Details
#initialize(hash) ⇒ ERBContext
Returns a new instance of ERBContext.
33 34 35 36 37 |
# File 'lib/xymonclient/helpers.rb', line 33 def initialize(hash) hash.each_pair do |key, value| instance_variable_set('@' + key.to_s, value) end end |
Instance Method Details
#context ⇒ Object
39 40 41 |
# File 'lib/xymonclient/helpers.rb', line 39 def context binding end |