Class: Qualtrics::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_idObject

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

#endpointObject

Returns the value of attribute endpoint.



3
4
5
# File 'lib/qualtrics/configuration.rb', line 3

def endpoint
  @endpoint
end

#library_idObject

Returns the value of attribute library_id.



3
4
5
# File 'lib/qualtrics/configuration.rb', line 3

def library_id
  @library_id
end

#tokenObject

Returns the value of attribute token.



3
4
5
# File 'lib/qualtrics/configuration.rb', line 3

def token
  @token
end

#userObject

Returns the value of attribute user.



3
4
5
# File 'lib/qualtrics/configuration.rb', line 3

def user
  @user
end

#versionObject

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