Class: GoogleAppsAuth::Result
- Inherits:
-
Object
- Object
- GoogleAppsAuth::Result
- Defined in:
- lib/googleapps_auth.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
- #[](attr) ⇒ Object
- #canceled? ⇒ Boolean
- #failed? ⇒ Boolean
-
#initialize(status, error = nil, attrs = nil) ⇒ Result
constructor
A new instance of Result.
- #succeeded? ⇒ Boolean
Constructor Details
#initialize(status, error = nil, attrs = nil) ⇒ Result
Returns a new instance of Result.
42 43 44 45 46 |
# File 'lib/googleapps_auth.rb', line 42 def initialize(status, error=nil, attrs=nil) @status = status @error = error @attrs = attrs || {} end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
41 42 43 |
# File 'lib/googleapps_auth.rb', line 41 def error @error end |
Instance Method Details
#[](attr) ⇒ Object
48 49 50 |
# File 'lib/googleapps_auth.rb', line 48 def [](attr) @attrs[attr] end |
#canceled? ⇒ Boolean
56 57 58 |
# File 'lib/googleapps_auth.rb', line 56 def canceled? @status == :canceled end |
#failed? ⇒ Boolean
60 61 62 |
# File 'lib/googleapps_auth.rb', line 60 def failed? @status == :failed end |
#succeeded? ⇒ Boolean
52 53 54 |
# File 'lib/googleapps_auth.rb', line 52 def succeeded? @status == :success end |