Class: DecisionAgent::Dmn::Feel::Types::Context

Inherits:
Hash
  • Object
show all
Defined in:
lib/decision_agent/dmn/feel/types.rb

Overview

Wrapper for contexts (FEEL key-value maps)

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Context



236
237
238
239
# File 'lib/decision_agent/dmn/feel/types.rb', line 236

def initialize(hash = {})
  super()
  hash.each { |k, v| self[k.to_sym] = v }
end

Instance Method Details

#inspectObject



245
246
247
# File 'lib/decision_agent/dmn/feel/types.rb', line 245

def inspect
  "#<Feel::Context #{to_h.inspect}>"
end

#to_rubyObject



241
242
243
# File 'lib/decision_agent/dmn/feel/types.rb', line 241

def to_ruby
  to_h
end