Class: L43Rmap::Evaluator

Inherits:
Object
  • Object
show all
Defined in:
lib/l43_rmap/evaluator.rb,
lib/l43_rmap/evaluator/evaluations.rb

Defined Under Namespace

Modules: Evaluations

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



7
8
9
# File 'lib/l43_rmap/evaluator.rb', line 7

def args
  @args
end

#funObject (readonly)

Returns the value of attribute fun.



7
8
9
# File 'lib/l43_rmap/evaluator.rb', line 7

def fun
  @fun
end

Instance Method Details

#call(rt) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/l43_rmap/evaluator.rb', line 9

def call(rt)
  #TODO: extract evaluate
  real_args = args.map do |arg| arg.(rt) end

  # p(real_args:)
  fun.(rt, *real_args)
end

#imageObject



17
# File 'lib/l43_rmap/evaluator.rb', line 17

def image = "Evaluator #{fun.name}"