Class: FakeSQS::Server
- Inherits:
-
Object
- Object
- FakeSQS::Server
- Defined in:
- lib/fake_sqs/server.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(options) ⇒ Server
constructor
A new instance of Server.
- #url_for(queue_id) ⇒ Object
Constructor Details
#initialize(options) ⇒ Server
Returns a new instance of Server.
6 7 8 9 |
# File 'lib/fake_sqs/server.rb', line 6 def initialize() @host = .fetch(:host) @port = .fetch(:port) end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
4 5 6 |
# File 'lib/fake_sqs/server.rb', line 4 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
4 5 6 |
# File 'lib/fake_sqs/server.rb', line 4 def port @port end |
Instance Method Details
#url_for(queue_id) ⇒ Object
11 12 13 |
# File 'lib/fake_sqs/server.rb', line 11 def url_for(queue_id) "http://#{host}:#{port}/#{queue_id}" end |