Class Benelux::Mark

  1. lib/benelux/mark.rb
Parent: Time

Methods

public class

  1. now

public instance

  1. ==
  2. distance
  3. inspect
  4. to_s
  5. track

Included modules

  1. Selectable::Object

Attributes

name [RW]

Public class methods

now (n=nil)
[show source]
    # File lib/benelux/mark.rb, line 5
 5:     def self.now(n=nil)
 6:       v = super()
 7:       v.tags = Selectable::Tags.new
 8:       v.name = n 
 9:       v
10:     end

Public instance methods

== (other)
[show source]
    # File lib/benelux/mark.rb, line 25
25:     def ==(other)
26:       self.name == other.name &&
27:       self.tags == other.tags &&
28:       self.to_f == self.to_f
29:     end
distance (time)
[show source]
    # File lib/benelux/mark.rb, line 22
22:     def distance(time)
23:       self - time
24:     end
inspect (reftime=nil)
[show source]
    # File lib/benelux/mark.rb, line 14
14:     def inspect(reftime=nil)
15:       val = reftime.nil? ? self : (reftime - self)
16:       "#<%s:%s at=%f name=%s %s>" % [self.class, hexoid, to_f, name, tags]
17:     end
to_s (reftime=nil)
[show source]
    # File lib/benelux/mark.rb, line 18
18:     def to_s(reftime=nil)
19:       val = reftime.nil? ? self : (reftime - self)
20:       val.to_f.to_s
21:     end
track ()
[show source]
    # File lib/benelux/mark.rb, line 11
11:     def track 
12:       @tags[:track]
13:     end