Class: Bidi2pdfRails::TestHelpers::Configuration
- Inherits:
-
Bidi2pdf::TestHelpers::Configuration
- Object
- Bidi2pdf::TestHelpers::Configuration
- Bidi2pdfRails::TestHelpers::Configuration
- Defined in:
- lib/bidi2pdf_rails/test_helpers/configuration.rb
Instance Attribute Summary collapse
- #request_host ⇒ Object
-
#run_server ⇒ Boolean
Whether to run the server during tests.
-
#server ⇒ Object
Returns the value of attribute server.
-
#server (for internal use only) ⇒ Object?
The server instance (nil if not set).
-
#server_boot_timeout ⇒ Integer
The timeout in seconds for server boot.
-
#server_host ⇒ String
The host address for the server.
-
#server_port ⇒ Integer?
The port for the server (nil if not set => random port).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
30 31 32 33 34 35 36 37 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 30 def initialize super @run_server = true @server_host = "localhost" @request_host = "localhost" @server_port = nil @server_boot_timeout = 15 end |
Instance Attribute Details
#request_host ⇒ Object
39 40 41 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 39 def request_host @request_host.respond_to?(:call) ? @request_host.call : @request_host end |
#run_server ⇒ Boolean
Returns whether to run the server during tests.
8 9 10 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 8 def run_server @run_server end |
#server ⇒ Object
Returns the value of attribute server.
28 29 30 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 28 def server @server end |
#server (for internal use only) ⇒ Object?
Returns the server instance (nil if not set).
28 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 28 attr_accessor :server |
#server_boot_timeout ⇒ Integer
Returns the timeout in seconds for server boot.
24 25 26 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 24 def server_boot_timeout @server_boot_timeout end |
#server_host ⇒ String
Returns the host address for the server.
12 13 14 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 12 def server_host @server_host end |
#server_port ⇒ Integer?
Returns the port for the server (nil if not set => random port).
20 21 22 |
# File 'lib/bidi2pdf_rails/test_helpers/configuration.rb', line 20 def server_port @server_port end |