Class: RestMyCase::AccusationAttorneys::Custom
- Defined in:
- lib/rest_my_case/accusation_attorneys/custom.rb
Instance Attribute Summary collapse
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(args) ⇒ Custom
constructor
A new instance of Custom.
- #validate(record) ⇒ Object
Constructor Details
#initialize(args) ⇒ Custom
Returns a new instance of Custom.
8 9 10 11 12 |
# File 'lib/rest_my_case/accusation_attorneys/custom.rb', line 8 def initialize(args) @methods = args super Helpers.(args) end |
Instance Attribute Details
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
6 7 8 |
# File 'lib/rest_my_case/accusation_attorneys/custom.rb', line 6 def methods @methods end |
Instance Method Details
#validate(record) ⇒ Object
14 15 16 |
# File 'lib/rest_my_case/accusation_attorneys/custom.rb', line 14 def validate(record) [*methods].map { |method| base.send(method, record) }.all? end |