Class: Idsimple::Rack::AccessTokenValidationResult
- Inherits:
-
Object
- Object
- Idsimple::Rack::AccessTokenValidationResult
- Defined in:
- lib/idsimple/rack/access_token_validation_result.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #add_error(msg) ⇒ Object
- #full_error_message ⇒ Object
-
#initialize ⇒ AccessTokenValidationResult
constructor
A new instance of AccessTokenValidationResult.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ AccessTokenValidationResult
Returns a new instance of AccessTokenValidationResult.
6 7 8 |
# File 'lib/idsimple/rack/access_token_validation_result.rb', line 6 def initialize @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/idsimple/rack/access_token_validation_result.rb', line 4 def errors @errors end |
Instance Method Details
#add_error(msg) ⇒ Object
18 19 20 |
# File 'lib/idsimple/rack/access_token_validation_result.rb', line 18 def add_error(msg) @errors << msg end |
#full_error_message ⇒ Object
22 23 24 |
# File 'lib/idsimple/rack/access_token_validation_result.rb', line 22 def "#{errors.join(". ")}." unless errors.empty? end |
#invalid? ⇒ Boolean
14 15 16 |
# File 'lib/idsimple/rack/access_token_validation_result.rb', line 14 def invalid? !valid? end |
#valid? ⇒ Boolean
10 11 12 |
# File 'lib/idsimple/rack/access_token_validation_result.rb', line 10 def valid? errors.empty? end |