Class: Framecurve::Tuple

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/framecurve/tuple.rb

Overview

Represents one Framecurve frame correlation record

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(at, value) ⇒ Tuple

Returns a new instance of Tuple.



6
7
8
# File 'lib/framecurve/tuple.rb', line 6

def initialize(at, value)
  @at, @value = at, value
end

Instance Attribute Details

#atObject (readonly)

Returns the value of attribute at.



4
5
6
# File 'lib/framecurve/tuple.rb', line 4

def at
  @at
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/framecurve/tuple.rb', line 4

def value
  @value
end

Instance Method Details

#<=>(another) ⇒ Object



22
23
24
# File 'lib/framecurve/tuple.rb', line 22

def <=>(another)
  to_s <=> another.to_s
end

#comment?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/framecurve/tuple.rb', line 14

def comment?
  false
end

#to_sObject



18
19
20
# File 'lib/framecurve/tuple.rb', line 18

def to_s
  "%d\t%.5f" % [at, value]
end

#tuple?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/framecurve/tuple.rb', line 10

def tuple?
  true
end