Class: XymonClient::ERBContext

Inherits:
Object
  • Object
show all
Defined in:
lib/xymonclient/helpers.rb

Overview

Class container for isolating context for ERB templating

Instance Method Summary collapse

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

#contextObject



39
40
41
# File 'lib/xymonclient/helpers.rb', line 39

def context
  binding
end