Class: AeEasy::Qa::ValidateValue
- Inherits:
-
Object
- Object
- AeEasy::Qa::ValidateValue
- Includes:
- Helpers
- Defined in:
- lib/ae_easy/qa/validate_value.rb
Instance Attribute Summary collapse
-
#data_hash ⇒ Object
readonly
Returns the value of attribute data_hash.
-
#errored_item ⇒ Object
readonly
Returns the value of attribute errored_item.
-
#field_to_validate ⇒ Object
readonly
Returns the value of attribute field_to_validate.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(data_hash, field_to_validate, params, errored_item) ⇒ ValidateValue
constructor
A new instance of ValidateValue.
- #run ⇒ Object
Methods included from Helpers
#add_errored_item, #evaluate_condition, #pass_if?
Constructor Details
#initialize(data_hash, field_to_validate, params, errored_item) ⇒ ValidateValue
Returns a new instance of ValidateValue.
8 9 10 11 12 13 |
# File 'lib/ae_easy/qa/validate_value.rb', line 8 def initialize(data_hash, field_to_validate, params, errored_item) @data_hash = data_hash @field_to_validate = field_to_validate @params = params @errored_item = errored_item end |
Instance Attribute Details
#data_hash ⇒ Object (readonly)
Returns the value of attribute data_hash.
6 7 8 |
# File 'lib/ae_easy/qa/validate_value.rb', line 6 def data_hash @data_hash end |
#errored_item ⇒ Object (readonly)
Returns the value of attribute errored_item.
6 7 8 |
# File 'lib/ae_easy/qa/validate_value.rb', line 6 def errored_item @errored_item end |
#field_to_validate ⇒ Object (readonly)
Returns the value of attribute field_to_validate.
6 7 8 |
# File 'lib/ae_easy/qa/validate_value.rb', line 6 def field_to_validate @field_to_validate end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/ae_easy/qa/validate_value.rb', line 6 def params @params end |
Instance Method Details
#run ⇒ Object
15 16 17 |
# File 'lib/ae_easy/qa/validate_value.rb', line 15 def run if_exists? ? handle_if : main_value_check end |