Class: Vanguard::Rule::Nullary::Confirmation

Inherits:
Vanguard::Rule::Nullary show all
Defined in:
lib/vanguard/rule/nullary/confirmation.rb

Overview

For for testing attribute confirmations

Defined Under Namespace

Classes: Builder, Evaluator

Constant Summary collapse

TYPE =
:confirmation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Vanguard::Rule::Nullary

builder, #type

Methods inherited from Vanguard::Rule

#evaluate, #evaluator, #violations

Constructor Details

#initialize(attribute_name, confirmation_attribute_name) ⇒ undefined

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.

Initialize object

Parameters:

  • attribute_name (Symbol)
  • confirmation_attribute_name (Symbol)


169
170
171
172
173
174
# File 'lib/vanguard/rule/nullary/confirmation.rb', line 169

def initialize(attribute_name, confirmation_attribute_name)
  @attribute_name,
  @confirmation_attribute_name =
    attribute_name,
    confirmation_attribute_name
end

Instance Attribute Details

#attribute_nameSymbol (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 attribute name

Returns:

  • (Symbol)


150
151
152
# File 'lib/vanguard/rule/nullary/confirmation.rb', line 150

def attribute_name
  @attribute_name
end

#confirmation_attribute_nameSymbol (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 confirmation attribute name

Returns:

  • (Symbol)


158
159
160
# File 'lib/vanguard/rule/nullary/confirmation.rb', line 158

def confirmation_attribute_name
  @confirmation_attribute_name
end