Class: Framecurve::Tuple
- Inherits:
-
Object
- Object
- Framecurve::Tuple
- Includes:
- Comparable
- Defined in:
- lib/framecurve/tuple.rb
Overview
Represents one Framecurve frame correlation record
Instance Attribute Summary collapse
-
#at ⇒ Object
readonly
Returns the value of attribute at.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(another) ⇒ Object
- #comment? ⇒ Boolean
-
#initialize(at, value) ⇒ Tuple
constructor
A new instance of Tuple.
- #to_s ⇒ Object
- #tuple? ⇒ Boolean
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
#at ⇒ Object (readonly)
Returns the value of attribute at.
4 5 6 |
# File 'lib/framecurve/tuple.rb', line 4 def at @at end |
#value ⇒ Object (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
14 15 16 |
# File 'lib/framecurve/tuple.rb', line 14 def comment? false end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/framecurve/tuple.rb', line 18 def to_s "%d\t%.5f" % [at, value] end |
#tuple? ⇒ Boolean
10 11 12 |
# File 'lib/framecurve/tuple.rb', line 10 def tuple? true end |