class Coopy::Ordering

Attributes

ignore_parent[RW]
order[RW]

Public Class Methods

new() click to toggle source
# File lib/lib/coopy/ordering.rb, line 7
def initialize
  @order = Array.new
  @ignore_parent = false
end

Public Instance Methods

add(l,r,p = -2) click to toggle source
# File lib/lib/coopy/ordering.rb, line 19
def add(l,r,p = -2)
  p = -2 if @ignore_parent
  @order.push(::Coopy::Unit.new(l,r,p))
end
get_list() click to toggle source
# File lib/lib/coopy/ordering.rb, line 24
def get_list 
  @order
end
set_list(lst) click to toggle source
# File lib/lib/coopy/ordering.rb, line 28
def set_list(lst)
  @order = lst
end
to_s() click to toggle source
# File lib/lib/coopy/ordering.rb, line 32
def to_s 
  txt = ""
  begin
    _g1 = 0
    _g = @order.length
    while(_g1 < _g) 
      i = _g1
      _g1+=1
      txt += ", " if i > 0
      txt += @order[i].to_s
    end
  end
  txt
end