class SPNet::CommandOutPort
Execute commands for a connected CommandInPort
object.
@author James Tunnell
Public Class Methods
new()
click to toggle source
A new instance of CommandOutPort
.
Calls superclass method
SPNet::OutPort::new
# File lib/spnet/ports/command_out_port.rb, line 9 def initialize super(:matching_class => CommandInPort) end
Public Instance Methods
exec_command(command, data = nil)
click to toggle source
If linked, return the result of calling the connected CommandInPort
object's exec_command
method. Otherwise, return false.
# File lib/spnet/ports/command_out_port.rb, line 24 def exec_command command, data = nil unless @link.nil? return @link.to.exec_command(command, data) end return false end
list_commands()
click to toggle source
If linked, return the result of calling the connected CommandInPort
object's list_commands
method. Otherwise, return false.
# File lib/spnet/ports/command_out_port.rb, line 15 def list_commands unless @link.nil? return @link.to.list_commands end return false end