Class: Qualtrics::Configuration
- Inherits:
-
Object
- Object
- Qualtrics::Configuration
- Defined in:
- lib/qualtrics/configuration.rb
Constant Summary collapse
- DEFAULT_VERSION =
'2.3'
- DEFAULT_ENDPOINT =
'https://co1.qualtrics.com/WRAPI/ControlPanel/api.php'
Instance Attribute Summary collapse
-
#default_library_id ⇒ Object
Returns the value of attribute default_library_id.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#library_id ⇒ Object
Returns the value of attribute library_id.
-
#token ⇒ Object
Returns the value of attribute token.
-
#user ⇒ Object
Returns the value of attribute user.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Configuration
constructor
A new instance of Configuration.
- #update(&block) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 |
# File 'lib/qualtrics/configuration.rb', line 7 def initialize(&block) block.call(self) if block_given? self.version ||= DEFAULT_VERSION self.endpoint ||= DEFAULT_ENDPOINT end |
Instance Attribute Details
#default_library_id ⇒ Object
Returns the value of attribute default_library_id.
3 4 5 |
# File 'lib/qualtrics/configuration.rb', line 3 def default_library_id @default_library_id end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
3 4 5 |
# File 'lib/qualtrics/configuration.rb', line 3 def endpoint @endpoint end |
#library_id ⇒ Object
Returns the value of attribute library_id.
3 4 5 |
# File 'lib/qualtrics/configuration.rb', line 3 def library_id @library_id end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/qualtrics/configuration.rb', line 3 def token @token end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/qualtrics/configuration.rb', line 3 def user @user end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/qualtrics/configuration.rb', line 3 def version @version end |
Instance Method Details
#update(&block) ⇒ Object
13 14 15 |
# File 'lib/qualtrics/configuration.rb', line 13 def update(&block) block.call(self) if block_given? end |