Class: ServiceDouble::Configuration
- Inherits:
-
Object
- Object
- ServiceDouble::Configuration
- Defined in:
- lib/service_double/configuration.rb
Instance Attribute Summary collapse
-
#disable_bundler ⇒ Object
Returns the value of attribute disable_bundler.
-
#log_file ⇒ Object
Returns the value of attribute log_file.
-
#server ⇒ Object
Returns the value of attribute server.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #name ⇒ Object
- #no_server_set! ⇒ Object
- #no_url_set! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 |
# File 'lib/service_double/configuration.rb', line 11 def initialize @url = nil @server = nil @log_file = nil @timeout = 5 @disable_bundler = true end |
Instance Attribute Details
#disable_bundler ⇒ Object
Returns the value of attribute disable_bundler.
9 10 11 |
# File 'lib/service_double/configuration.rb', line 9 def disable_bundler @disable_bundler end |
#log_file ⇒ Object
Returns the value of attribute log_file.
9 10 11 |
# File 'lib/service_double/configuration.rb', line 9 def log_file @log_file end |
#server ⇒ Object
Returns the value of attribute server.
9 10 11 |
# File 'lib/service_double/configuration.rb', line 9 def server @server end |
#timeout ⇒ Object
Returns the value of attribute timeout.
9 10 11 |
# File 'lib/service_double/configuration.rb', line 9 def timeout @timeout end |
#url ⇒ Object
Returns the value of attribute url.
9 10 11 |
# File 'lib/service_double/configuration.rb', line 9 def url @url end |
Instance Method Details
#name ⇒ Object
40 41 42 |
# File 'lib/service_double/configuration.rb', line 40 def name File.basename(server, ".rb") end |
#no_server_set! ⇒ Object
48 49 50 |
# File 'lib/service_double/configuration.rb', line 48 def no_server_set! raise NoServerSet, "No server option set." end |
#no_url_set! ⇒ Object
44 45 46 |
# File 'lib/service_double/configuration.rb', line 44 def no_url_set! raise NoURLSet, "No URL set for the fake shop." end |