Class: Woople::Session
- Inherits:
-
Object
- Object
- Woople::Session
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/woople-session.rb,
lib/woople-session/base.rb,
lib/woople-session/version.rb
Constant Summary collapse
- VERSION =
"0.0.4"
Class Method Summary collapse
-
.find(controller) ⇒ Object
Class.
Instance Method Summary collapse
-
#initialize(controller, token) ⇒ Session
constructor
Instance.
- #save ⇒ Object
Constructor Details
#initialize(controller, token) ⇒ Session
Instance
18 19 20 21 |
# File 'lib/woople-session/base.rb', line 18 def initialize(controller, token) @controller = controller @token = token end |
Class Method Details
.find(controller) ⇒ Object
Class
13 14 15 |
# File 'lib/woople-session/base.rb', line 13 def self.find(controller) controller.session[:sso] end |
Instance Method Details
#save ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/woople-session/base.rb', line 23 def save if valid? @controller.session[:sso] = get_token return true else return false end end |