Class: ResponseEncryption::ActiveModelService
- Inherits:
-
Object
- Object
- ResponseEncryption::ActiveModelService
- Includes:
- ActiveModel::Model
- Defined in:
- lib/response_encryption/active_model_service.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ActiveModelService
constructor
A new instance of ActiveModelService.
- #valid? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ ActiveModelService
Returns a new instance of ActiveModelService.
18 19 20 21 |
# File 'lib/response_encryption/active_model_service.rb', line 18 def initialize(={}) super @errors = ::ActiveModel::Errors.new(self) end |
Instance Method Details
#valid? ⇒ Boolean
24 25 26 |
# File 'lib/response_encryption/active_model_service.rb', line 24 def valid? errors.blank? end |