Class: TableauRestApi::Config
- Inherits:
-
Object
- Object
- TableauRestApi::Config
- Defined in:
- lib/tableau_rest_api/util/config.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config = {}) ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/tableau_rest_api/util/config.rb', line 5 def initialize(config={}) @options = { host: ENV['TABLEAU_HOST'] || 'https://tableau.lvh.me', api_version: '2.6', base: 'api', auth_duration: ENV['TABLEAU_AUTH_TOKEN_DURATION'] || 4.hours, credentials: { credentials: { name: ENV['TABLEAU_USERNAME'] || 'admin', password: ENV['TABLEAU_PASSWORD'] || 'admin', site: { contentUrl: "" } } } } @options = @options.merge(config) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/tableau_rest_api/util/config.rb', line 3 def @options end |