Class: SimplePublisher::StarlingConnection
- Inherits:
-
Object
- Object
- SimplePublisher::StarlingConnection
- Defined in:
- lib/simple_publisher/starling_connection.rb
Instance Attribute Summary collapse
-
#starling_url ⇒ Object
readonly
Returns the value of attribute starling_url.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ StarlingConnection
constructor
A new instance of StarlingConnection.
- #write(options) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ StarlingConnection
Returns a new instance of StarlingConnection.
8 9 10 |
# File 'lib/simple_publisher/starling_connection.rb', line 8 def initialize(attributes = {}) @starling_url = "#{attributes[:host]}:#{attributes[:port]}" end |
Instance Attribute Details
#starling_url ⇒ Object (readonly)
Returns the value of attribute starling_url.
6 7 8 |
# File 'lib/simple_publisher/starling_connection.rb', line 6 def starling_url @starling_url end |
Instance Method Details
#write(options) ⇒ Object
12 13 14 |
# File 'lib/simple_publisher/starling_connection.rb', line 12 def write() starling.set([:to].name, [:message].body) end |