Module: HttpStub::Configurer::ClassMethods
- Defined in:
- lib/http_stub/configurer.rb
Instance Method Summary collapse
- #get_base_uri ⇒ Object
- #get_host ⇒ Object
- #get_port ⇒ Object
- #host(host) ⇒ Object
- #initialize! ⇒ Object
- #port(port) ⇒ Object
- #stub_server ⇒ Object
Instance Method Details
#get_base_uri ⇒ Object
29 30 31 |
# File 'lib/http_stub/configurer.rb', line 29 def get_base_uri "http://#{@host}:#{@port}" end |
#get_host ⇒ Object
13 14 15 |
# File 'lib/http_stub/configurer.rb', line 13 def get_host @host end |
#get_port ⇒ Object
21 22 23 |
# File 'lib/http_stub/configurer.rb', line 21 def get_port @port end |
#host(host) ⇒ Object
17 18 19 |
# File 'lib/http_stub/configurer.rb', line 17 def host(host) @host = host end |
#initialize! ⇒ Object
37 38 39 40 41 42 |
# File 'lib/http_stub/configurer.rb', line 37 def initialize! on_initialize if self.respond_to?(:on_initialize) && !@initialized server_facade.flush_requests server_facade.remember_stubs @initialized = true end |
#port(port) ⇒ Object
25 26 27 |
# File 'lib/http_stub/configurer.rb', line 25 def port(port) @port = port end |
#stub_server ⇒ Object
33 34 35 |
# File 'lib/http_stub/configurer.rb', line 33 def stub_server @dsl ||= HttpStub::Configurer::Server::DSL.new(server_facade) end |