Class: Rocket::Client
- Inherits:
-
Object
- Object
- Rocket::Client
- Defined in:
- lib/rocket/client.rb
Overview
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #[](channel) ⇒ Object
- #connection {|socket| ... } ⇒ Object
-
#initialize(url, app_id, secret) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(url, app_id, secret) ⇒ Client
Returns a new instance of Client.
15 16 17 18 |
# File 'lib/rocket/client.rb', line 15 def initialize(url, app_id, secret) @url = File.join(url, 'app', app_id) + '?secret=' + secret @app_id = app_id end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
12 13 14 |
# File 'lib/rocket/client.rb', line 12 def app_id @app_id end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
13 14 15 |
# File 'lib/rocket/client.rb', line 13 def secret @secret end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
11 12 13 |
# File 'lib/rocket/client.rb', line 11 def url @url end |