Class: AllscriptsApi::Configuration
- Inherits:
-
Object
- Object
- AllscriptsApi::Configuration
- Defined in:
- lib/allscripts_api/configuration.rb
Overview
Configuration class to allow configuration on application initialization. Configuration should look like the following.
AllscriptsApi.configure do |config|
config.app_name = 'YOUR_APP_NAME_HERE'
config.app_username = 'YOUR_APP_USERNAME_HERE'
config.app_password = 'YOUR_APP_PASSWORD_HERE'
config.faraday_adapter = Faraday.some_adapter # default = Faraday.default_adapter
end
Instance Attribute Summary collapse
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#app_password ⇒ Object
Returns the value of attribute app_password.
-
#app_username ⇒ Object
Returns the value of attribute app_username.
-
#faraday_adapter ⇒ Object
Returns the value of attribute faraday_adapter.
Instance Method Summary collapse
-
#initialize ⇒ AllscriptsApi:Configuration
constructor
The initialize method may be passed a block, but defaults to fetching data from the environment.
Constructor Details
#initialize ⇒ AllscriptsApi:Configuration
The initialize method may be passed a block, but defaults to fetching data from the environment
19 20 21 22 23 24 |
# File 'lib/allscripts_api/configuration.rb', line 19 def initialize @app_name = ENV["app_name"] @app_password = ENV["app_password"] @app_username = ENV["app_username"] @faraday_adapter = Faraday.default_adapter end |
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
14 15 16 |
# File 'lib/allscripts_api/configuration.rb', line 14 def app_name @app_name end |
#app_password ⇒ Object
Returns the value of attribute app_password.
14 15 16 |
# File 'lib/allscripts_api/configuration.rb', line 14 def app_password @app_password end |
#app_username ⇒ Object
Returns the value of attribute app_username.
14 15 16 |
# File 'lib/allscripts_api/configuration.rb', line 14 def app_username @app_username end |
#faraday_adapter ⇒ Object
Returns the value of attribute faraday_adapter.
14 15 16 |
# File 'lib/allscripts_api/configuration.rb', line 14 def faraday_adapter @faraday_adapter end |