Class: RestMyCase::AccusationAttorneys::Base
- Inherits:
-
Object
- Object
- RestMyCase::AccusationAttorneys::Base
- Defined in:
- lib/rest_my_case/accusation_attorneys/base.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
-
#validate(record) ⇒ Object
Override this method in subclasses with validation logic, adding errors to the records
errorsarray where necessary.
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
10 11 12 |
# File 'lib/rest_my_case/accusation_attorneys/base.rb', line 10 def initialize( = {}) = Helpers.except(, :class).freeze end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
6 7 8 |
# File 'lib/rest_my_case/accusation_attorneys/base.rb', line 6 def base @base end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/rest_my_case/accusation_attorneys/base.rb', line 8 def end |
Instance Method Details
#validate(record) ⇒ Object
Override this method in subclasses with validation logic, adding errors to the records errors array where necessary.
16 17 18 |
# File 'lib/rest_my_case/accusation_attorneys/base.rb', line 16 def validate(record) fail NotImplementedError, "Subclasses must implement a validate(record) method." end |