Class: FFWD::Core::Interface

Inherits:
Object
  • Object
show all
Includes:
Lifecycle
Defined in:
lib/ffwd/core/interface.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Lifecycle

#depend_on, #start, #started?, #starting, #starting_hooks, #stop, #stopped?, #stopping, #stopping_hooks

Constructor Details

#initialize(input, output, tunnel_plugins, statistics, debug, processors, opts) ⇒ Interface

Returns a new instance of Interface.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ffwd/core/interface.rb', line 28

def initialize(
  input, output,
  tunnel_plugins, statistics, debug,
  processors, opts
)
  @input = input
  @output = output
  @tunnel_plugins = tunnel_plugins
  @statistics = statistics
  @debug = debug
  @processors = processors
  @opts = opts
  @tags = opts[:tags] || []
  @attributes = opts[:attributes] || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



26
27
28
# File 'lib/ffwd/core/interface.rb', line 26

def attributes
  @attributes
end

#debugObject (readonly)

Returns the value of attribute debug.



25
26
27
# File 'lib/ffwd/core/interface.rb', line 25

def debug
  @debug
end

#inputObject (readonly)

Returns the value of attribute input.



24
25
26
# File 'lib/ffwd/core/interface.rb', line 24

def input
  @input
end

#outputObject (readonly)

Returns the value of attribute output.



24
25
26
# File 'lib/ffwd/core/interface.rb', line 24

def output
  @output
end

#processorsObject (readonly)

Returns the value of attribute processors.



25
26
27
# File 'lib/ffwd/core/interface.rb', line 25

def processors
  @processors
end

#statisticsObject (readonly)

Returns the value of attribute statistics.



25
26
27
# File 'lib/ffwd/core/interface.rb', line 25

def statistics
  @statistics
end

#tagsObject (readonly)

Returns the value of attribute tags.



26
27
28
# File 'lib/ffwd/core/interface.rb', line 26

def tags
  @tags
end

#tunnel_pluginsObject (readonly)

Returns the value of attribute tunnel_plugins.



25
26
27
# File 'lib/ffwd/core/interface.rb', line 25

def tunnel_plugins
  @tunnel_plugins
end

Instance Method Details

#reconnect(input) ⇒ Object



44
45
46
47
48
# File 'lib/ffwd/core/interface.rb', line 44

def reconnect input
  self.class.new(
    input, @output, @tunnel_plugins, @statistics, @debug, @processors,
    @opts)
end