Class: AccessToken
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AccessToken
- Includes:
- MongoMapper::Document
- Defined in:
- lib/passport/support/mongo.rb,
lib/passport/support/object.rb,
lib/passport/support/active_record.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ AccessToken
constructor
A new instance of AccessToken.
- #to_hash ⇒ Object
Constructor Details
#initialize(attributes) ⇒ AccessToken
Returns a new instance of AccessToken.
4 5 6 7 8 |
# File 'lib/passport/support/object.rb', line 4 def initialize(attributes) attributes.each do |k, v| self.send("#{k.to_s}=", v) if self.respond_to?("#{k.to_s}=") end end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
2 3 4 |
# File 'lib/passport/support/object.rb', line 2 def key @key end |
#secret ⇒ Object
Returns the value of attribute secret.
2 3 4 |
# File 'lib/passport/support/object.rb', line 2 def secret @secret end |
#token ⇒ Object
Returns the value of attribute token.
2 3 4 |
# File 'lib/passport/support/object.rb', line 2 def token @token end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 |
# File 'lib/passport/support/object.rb', line 10 def to_hash {:token => token, :secret => secret, :key => key} end |