class Fluxite::Cord(T)

Overview

Cord is a programmatically toggleable connection between two ports. Functionally resembles a valve which you can open (#enable) or close (#disable).

Defined in:

fluxite/cord.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input : Port(T), output : Port(T)) #

[View source]

Instance Method Detail

def disable : self #

Restricts objects from passing from the input port to the output port.


[View source]
def enable : self #

Lets objects pass from the input port to the output port.


[View source]
def enabled? #

Returns true if this cord is enabled (objects emitted by the input port are passed to the output port). Otherwise, returns false.


[View source]
def input : Port(T) #

Returns the input port.


[View source]
def inspect(io) #

[View source]
def output : Port(T) #

Returns the output port.


[View source]
def to_s(io) #

[View source]