Class: Ribose::Session
- Inherits:
-
Object
- Object
- Ribose::Session
- Defined in:
- lib/ribose/session.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(username, password) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(username, password) ⇒ Session
Returns a new instance of Session.
7 8 9 10 |
# File 'lib/ribose/session.rb', line 7 def initialize(username, password) @username = username @password = password end |
Class Method Details
.create(username:, password:) ⇒ Object
18 19 20 |
# File 'lib/ribose/session.rb', line 18 def self.create(username:, password:) new(username, password).create end |
Instance Method Details
#create ⇒ Object
12 13 14 15 16 |
# File 'lib/ribose/session.rb', line 12 def create authenticate_user rescue NoMethodError, JSON::ParserError raise Ribose::Unauthorized end |