Class: LeanTesting::Client
- Inherits:
-
Object
- Object
- LeanTesting::Client
- Defined in:
- lib/leantesting.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
-
#auth ⇒ Object
readonly
Returns the value of attribute auth.
-
#bugs ⇒ Object
readonly
Returns the value of attribute bugs.
-
#debugReturn ⇒ Object
Returns the value of attribute debugReturn.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#projects ⇒ Object
readonly
Returns the value of attribute projects.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#attachToken(accessToken) ⇒ Object
Function to attach new token to SDK Client instance.
-
#getCurrentToken ⇒ Object
Function to retrieve curently attached token.
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/leantesting.rb', line 21 def initialize @accessToken = nil @auth = OAuth2Handler.new(self) @user = UserHandler.new(self) @projects = ProjectsHandler.new(self) @bugs = BugsHandler.new(self) @attachments = AttachmentsHandler.new(self) @platform = PlatformHandler.new(self) end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
11 12 13 |
# File 'lib/leantesting.rb', line 11 def @attachments end |
#auth ⇒ Object (readonly)
Returns the value of attribute auth.
11 12 13 |
# File 'lib/leantesting.rb', line 11 def auth @auth end |
#bugs ⇒ Object (readonly)
Returns the value of attribute bugs.
11 12 13 |
# File 'lib/leantesting.rb', line 11 def bugs @bugs end |
#debugReturn ⇒ Object
Returns the value of attribute debugReturn.
19 20 21 |
# File 'lib/leantesting.rb', line 19 def debugReturn @debugReturn end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
11 12 13 |
# File 'lib/leantesting.rb', line 11 def platform @platform end |
#projects ⇒ Object (readonly)
Returns the value of attribute projects.
11 12 13 |
# File 'lib/leantesting.rb', line 11 def projects @projects end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
11 12 13 |
# File 'lib/leantesting.rb', line 11 def user @user end |
Instance Method Details
#attachToken(accessToken) ⇒ Object
Function to attach new token to SDK Client instance. Token changes are dynamic; all objects/entities originating from an instance which has had its token updated will utilize the new token automatically.
Arguments: accessToken String – the string of the token to be attached
Exceptions: SDKInvalidArgException if provided accessToken param is not a string
57 58 59 60 61 62 |
# File 'lib/leantesting.rb', line 57 def attachToken(accessToken) if !accessToken.is_a? String raise SDKInvalidArgException, '`accessToken` must be a string' end @accessToken = accessToken end |
#getCurrentToken ⇒ Object
Function to retrieve curently attached token.
Returns: String – if a token is attached boolean – if no token is attached
39 40 41 42 43 44 45 |
# File 'lib/leantesting.rb', line 39 def getCurrentToken if !@accessToken return false end @accessToken end |