Class: Directive::Evaluator

Inherits:
Object
  • Object
show all
Defined in:
lib/directive/evaluator.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, configuration) ⇒ Evaluator

Returns a new instance of Evaluator.

Parameters:

  • path (Array<Symbol, String>)

    A message path for the desired config

  • configuration (Directive::Reader)


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

def initialize(path, configuration)
  @path = path
  @configuration = configuration
end

Instance Method Details

#readObject



12
13
14
# File 'lib/directive/evaluator.rb', line 12

def read
  path.inject(configuration, &:public_send)
end