class Benelux::Range
Attributes
exception[RW]
from[RW]
name[RW]
to[RW]
Public Class Methods
new(name,from,to)
click to toggle source
# File lib/benelux/range.rb, line 10 def initialize(name,from,to) @name, @from, @to = name, from, to @tags = Selectable::Tags.new end
Public Instance Methods
<(other)
click to toggle source
# File lib/benelux/range.rb, line 43 def <(other) from < other end
<=>(other)
click to toggle source
# File lib/benelux/range.rb, line 40 def <=>(other) from <=> other.from end
>(other)
click to toggle source
# File lib/benelux/range.rb, line 46 def >(other) from > other end
call_id()
click to toggle source
# File lib/benelux/range.rb, line 28 def call_id @from.nil? ? :unknown : @from.call_id end
duration()
click to toggle source
# File lib/benelux/range.rb, line 37 def duration to - from end
failed?()
click to toggle source
# File lib/benelux/range.rb, line 34 def failed? !successful? end
inspect()
click to toggle source
# File lib/benelux/range.rb, line 17 def inspect args = [self.class, hexoid, duration, from, to, name, tags] "#<%s:%s duration=%0.4f from=%s to=%s name=%s %s>" % args end
successful?()
click to toggle source
# File lib/benelux/range.rb, line 31 def successful? @exception.nil? end
thread_id()
click to toggle source
# File lib/benelux/range.rb, line 25 def thread_id @from.nil? ? :unknown : @from.thread_id end
to_s()
click to toggle source
# File lib/benelux/range.rb, line 14 def to_s "%s:%.4f" % [name, duration] end
track()
click to toggle source
# File lib/benelux/range.rb, line 22 def track @from.nil? ? :unknown : @from.track end