Module: Doorkeeper::Validations
- Extended by:
- ActiveSupport::Concern
- Included in:
- OAuth::AuthorizationCodeRequest, OAuth::ClientCredentialsRequest::Validation, OAuth::PasswordAccessTokenRequest, OAuth::PreAuthorization, OAuth::RefreshTokenRequest
- Defined in:
- lib/doorkeeper/validations.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
5 6 7 |
# File 'lib/doorkeeper/validations.rb', line 5 def error @error end |
Instance Method Details
#valid? ⇒ Boolean
15 16 17 18 |
# File 'lib/doorkeeper/validations.rb', line 15 def valid? validate @error.nil? end |
#validate ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/doorkeeper/validations.rb', line 7 def validate @error = nil self.class.validations.each do |validation| break if @error @error = validation.last unless send("validate_#{validation.first}") end end |