Class: OpenCPU::Configuration
- Inherits:
-
Object
- Object
- OpenCPU::Configuration
- Defined in:
- lib/opencpu/configuration.rb
Instance Attribute Summary collapse
-
#endpoint_url ⇒ Object
Returns the value of attribute endpoint_url.
-
#fake_responses ⇒ Object
Returns the value of attribute fake_responses.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#password ⇒ Object
Returns the value of attribute password.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
-
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
Instance Method Summary collapse
- #add_fake_response(key, response) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #remove_fake_response(key) ⇒ Object
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 |
# File 'lib/opencpu/configuration.rb', line 11 def initialize @fake_responses = {} @verify_ssl = true end |
Instance Attribute Details
#endpoint_url ⇒ Object
Returns the value of attribute endpoint_url.
3 4 5 |
# File 'lib/opencpu/configuration.rb', line 3 def endpoint_url @endpoint_url end |
#fake_responses ⇒ Object
Returns the value of attribute fake_responses.
8 9 10 |
# File 'lib/opencpu/configuration.rb', line 8 def fake_responses @fake_responses end |
#mode ⇒ Object
Returns the value of attribute mode.
7 8 9 |
# File 'lib/opencpu/configuration.rb', line 7 def mode @mode end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/opencpu/configuration.rb', line 6 def password @password end |
#timeout ⇒ Object
Returns the value of attribute timeout.
4 5 6 |
# File 'lib/opencpu/configuration.rb', line 4 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/opencpu/configuration.rb', line 5 def username @username end |
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
9 10 11 |
# File 'lib/opencpu/configuration.rb', line 9 def verify_ssl @verify_ssl end |
Instance Method Details
#add_fake_response(key, response) ⇒ Object
16 17 18 |
# File 'lib/opencpu/configuration.rb', line 16 def add_fake_response(key, response) @fake_responses[key] = response end |
#remove_fake_response(key) ⇒ Object
20 21 22 |
# File 'lib/opencpu/configuration.rb', line 20 def remove_fake_response(key) @fake_responses.delete key end |
#reset! ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/opencpu/configuration.rb', line 24 def reset! @endpoint_url = nil @timeout = nil @username = nil @password = nil @mode = nil @verify_ssl = true @fake_responses = {} end |