Class: Vines::Config::ComponentPort

Inherits:
Port
  • Object
show all
Defined in:
lib/vines/config.rb

Instance Attribute Summary

Attributes inherited from Port

#config, #stream

Instance Method Summary collapse

Methods inherited from Port

#max_stanza_size, #start

Methods included from Log

#log

Constructor Details

#initialize(config, host = '0.0.0.0', port = 5347, &block) ⇒ ComponentPort

Returns a new instance of ComponentPort.



215
216
217
218
# File 'lib/vines/config.rb', line 215

def initialize(config, host='0.0.0.0', port=5347, &block)
  @components, @stream = {}, Vines::Stream::Component
  super(config, host, port, &block)
end

Instance Method Details

#components(options = nil) ⇒ Object



220
221
222
223
224
225
226
# File 'lib/vines/config.rb', line 220

def components(options=nil)
  if options
    @components = options
  else
    @components
  end
end

#password(component) ⇒ Object



228
229
230
# File 'lib/vines/config.rb', line 228

def password(component)
  @components[component]
end