Class: Vanguard::DSL::Evaluator

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/vanguard/dsl/evaluator.rb

Defined Under Namespace

Classes: Connector

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsArray (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return arguments array

Returns:

  • (Array)


28
29
30
# File 'lib/vanguard/dsl/evaluator.rb', line 28

def arguments
  @arguments
end

#klassClass (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return klass

Returns:

  • (Class)


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

def klass
  @klass
end

#optionsHash (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return options hash

Returns:

  • (Hash)


20
21
22
# File 'lib/vanguard/dsl/evaluator.rb', line 20

def options
  @options
end

Instance Method Details

#rulesEnumerable<Rule>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return rules

Returns:

  • (Enumerable<Rule>)


36
37
38
39
40
# File 'lib/vanguard/dsl/evaluator.rb', line 36

def rules
  klass.run(arguments, rule_options).map do |rule|
    connector.connect(rule)
  end
end