Class: Antech::Client
- Inherits:
-
Object
- Object
- Antech::Client
- Defined in:
- lib/antech/client.rb
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
readonly
Returns the value of attribute auth_token.
Instance Method Summary collapse
-
#initialize(credentials = nil) ⇒ Client
constructor
A new instance of Client.
- #lab_results ⇒ Object
- #tests ⇒ Object
Constructor Details
#initialize(credentials = nil) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 18 |
# File 'lib/antech/client.rb', line 10 def initialize(credentials = nil) raise ArgumentError.new 'Credentials are required to initialize the client' if credentials.nil? [:clinic_id, :username, :password].each do |key| raise ArgumentError.new ":#{key} is required to initialize the client" if credentials[key].nil? end @auth_token = login(credentials) end |
Instance Attribute Details
#auth_token ⇒ Object (readonly)
Returns the value of attribute auth_token.
8 9 10 |
# File 'lib/antech/client.rb', line 8 def auth_token @auth_token end |