Class: Timekit::Authorization
- Inherits:
-
Object
- Object
- Timekit::Authorization
- Defined in:
- lib/timekit/authorization.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
readonly
Returns the value of attribute api_token.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(email, api_token) ⇒ Authorization
constructor
A new instance of Authorization.
Constructor Details
#initialize(email, api_token) ⇒ Authorization
Returns a new instance of Authorization.
6 7 8 9 |
# File 'lib/timekit/authorization.rb', line 6 def initialize(email, api_token) @email = email @api_token = api_token end |
Instance Attribute Details
#api_token ⇒ Object (readonly)
Returns the value of attribute api_token.
4 5 6 |
# File 'lib/timekit/authorization.rb', line 4 def api_token @api_token end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/timekit/authorization.rb', line 4 def email @email end |
Instance Method Details
#as_json ⇒ Object
11 12 13 14 15 16 |
# File 'lib/timekit/authorization.rb', line 11 def as_json { email: @email, api_token: @api_token } end |