class YPetri::Agent::Selection

Public Class Methods

new() click to toggle source

TODO: This calls for refactor as Array subclass. No time right now…

# File lib/y_petri/agent/selection.rb, line 4
def initialize
  clear
end

Public Instance Methods

<<(arg;)
Alias for: add
add(arg;) click to toggle source
# File lib/y_petri/agent/selection.rb, line 10
def add arg; @selection << arg end
Also aliased as: <<
clear() click to toggle source
# File lib/y_petri/agent/selection.rb, line 7
def clear; @selection = [] end
get() click to toggle source
# File lib/y_petri/agent/selection.rb, line 9
def get; @selection end
set(*aa;) click to toggle source
# File lib/y_petri/agent/selection.rb, line 8
def set *aa; @selection = aa end
subtract(arg;) click to toggle source
# File lib/y_petri/agent/selection.rb, line 12
def subtract arg; @selection -= arg end