Class: NATS::Services
- Inherits:
-
Utils::List
- Object
- Utils::List
- NATS::Services
- Defined in:
- lib/nats/service.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Attributes inherited from Utils::List
Instance Method Summary collapse
- #add(options) ⇒ Object
-
#initialize(client) ⇒ Services
constructor
A new instance of Services.
Methods inherited from Utils::List
Constructor Details
#initialize(client) ⇒ Services
Returns a new instance of Services.
107 108 109 110 |
# File 'lib/nats/service.rb', line 107 def initialize(client) @client = client super end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
105 106 107 |
# File 'lib/nats/service.rb', line 105 def client @client end |
Instance Method Details
#add(options) ⇒ Object
112 113 114 115 116 117 118 119 |
# File 'lib/nats/service.rb', line 112 def add() client.synchronize do service = NATS::Service.new(client, ) insert(service) service end end |