In Files

Parent

RubyEditConnector

RubyEditConnector objects are sent by FlowStone to a RubyEdit's 'event' method in order to identify which connector just received a new value or trigger. They contain some clever code so that the connector can easily be identified either by its index or its label using pretty much the same code.

Public Instance Methods

*(Numeric) → Numeric click to toggle source

Multiplies the RubyEditConnector's index by the value and returns this value.

# File Flowstone API.rb, line 1265
def *(other)
  #DUMMY
end
+(Numeric) → Numeric click to toggle source

Adds the RubyEditConnector's index to the value and returns this value.

# File Flowstone API.rb, line 1238
def +(other)
  #DUMMY
end
-(Numeric) → Numeric click to toggle source

Subtracts the value from the RubyEditConnector's index and returns this value.

# File Flowstone API.rb, line 1256
def -(other)
  #DUMMY
end
/(Numeric) → Numeric click to toggle source

Divides the RubyEditConnector's index by the value and returns this value.

# File Flowstone API.rb, line 1247
def /(other)
  #DUMMY
end
<(Numeric) → true/false click to toggle source

Returns true if the RubyEditConnector's index is less than the number.

# File Flowstone API.rb, line 1220
def <(other)
  #DUMMY
end
<=(Numeric) → true/false click to toggle source

Returns true if the RubyEditConnector's index is less than or equal to the number.

# File Flowstone API.rb, line 1229
def <=(other)
  #DUMMY
end
<=>(Numeric) → -1, 0 or 1 click to toggle source

Compares the index of the RubyEditConnector with the given number. Returns -1 if less, 0 if equal, or 1 if greater than the number.

# File Flowstone API.rb, line 1193
def <=>(other)
  #DUMMY
end
==(Numeric/String) → true/false click to toggle source

Tests the identity of the connector. If an number is given, the connector's index is compared. If a String is given, the connector label is compared.

Example:

 def event(in_id)

   if in_id == 0
     watch "The first input was just triggered"
   end

   if in_id == "my_input"
     watch "The connector labelled 'my_input' was just triggered"
   end

end
# File Flowstone API.rb, line 1128
def ==(other)
  #DUMMY
end
===(Numeric/String) → true/false click to toggle source

You will be unlikely to use this directly in your code. '===' is the special form of comparison used by 'case' statements. Like '==', it can compare against either a connector's index, or its label.

Example:

def event(in_id)

  case in_id
  when 0
    watch "The first input just triggered"
  when "my_input"
    watch "The connector labelled 'my_input' triggered"
  else watch "I don't recognise this input"
  end # the 'case' statement

end
# File Flowstone API.rb, line 1151
def ===(other)
  #DUMMY
end
>(Numeric) → true/false click to toggle source

Returns true if the RubyEditConnector's index is greater than the number.

# File Flowstone API.rb, line 1202
def >(other)
  #DUMMY
end
>=(Numeric) → true/false click to toggle source

Returns true if the RubyEditConnector's index is greater than or equal to the number.

# File Flowstone API.rb, line 1211
def >=(other)
  #DUMMY
end
index → Fixnum click to toggle source

Returns the integer index of the connector

Example:

def event(in_id)

  watch "Triggered connector at index ", in_id.index

end
# File Flowstone API.rb, line 1183
def index
  #DUMMY
end
name → String click to toggle source

Returns the connector name (label) of the connector as a String.

Example:

def event(in_id)

  watch "Triggered connector called", in_id.name

end
# File Flowstone API.rb, line 1167
def name
  #DUMMY
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.