Module: LedgerSync::ValidationResult::ResultTypeBase
- Defined in:
- lib/ledger_sync/result.rb
Instance Attribute Summary collapse
-
#validator ⇒ Object
readonly
Returns the value of attribute validator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(validator, **keywords) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Instance Attribute Details
#validator ⇒ Object (readonly)
Returns the value of attribute validator.
100 101 102 |
# File 'lib/ledger_sync/result.rb', line 100 def validator @validator end |
Class Method Details
.included(base) ⇒ Object
102 103 104 105 106 |
# File 'lib/ledger_sync/result.rb', line 102 def self.included(base) base.class_eval do simply_serialize only: %i[validator] end end |
Instance Method Details
#initialize(validator, **keywords) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
108 109 110 111 112 113 |
# File 'lib/ledger_sync/result.rb', line 108 def initialize(validator, **keywords) # rubocop:disable Lint/UnusedMethodArgument raise 'The argument must be a validator' unless validator.is_a?(Util::Validator) @validator = validator super(validator) end |