Class: Vanguard::Rule::Guard

Inherits:
Vanguard::Rule show all
Defined in:
lib/vanguard/rule/guard.rb

Defined Under Namespace

Classes: Evaluator

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Vanguard::Rule

#evaluate, #evaluator, #violations

Instance Attribute Details

#matcherMatcher (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 matcher

Returns:



10
11
12
# File 'lib/vanguard/rule/guard.rb', line 10

def matcher
  @matcher
end

#operandRule (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 operand

Returns:



18
19
20
# File 'lib/vanguard/rule/guard.rb', line 18

def operand
  @operand
end

Instance Method Details

#attribute_nameSymbol

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 attribute name

Returns:

  • (Symbol)


26
27
28
# File 'lib/vanguard/rule/guard.rb', line 26

def attribute_name
  operand.attribute_name
end

#typeSymbol

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 symbolic type

Returns:

  • (Symbol)


37
38
39
# File 'lib/vanguard/rule/guard.rb', line 37

def type
  operand.type
end