class OFlow::Stamp
Information used to identify a location and time that a Box
was received. Stamps are placed in Trackers.
Attributes
op[R]
Operation that caused the Stamp
to be created.
time[R]
The time the Stamp
was created.
Public Class Methods
new(location, op=nil, time=nil)
click to toggle source
Create a new Stamp
. @param location [String] full name of Task
that created the Stamp
in a Tracker
@param op [Symbol] operation that caused the Stamp
to be created @param time [Time] time the Stamp
was created
# File lib/oflow/stamp.rb, line 21 def initialize(location, op=nil, time=nil) @location = location @op = op @time = (time || Time.now).utc end
Public Instance Methods
to_s()
click to toggle source
Returns a String representation of the Stamp
.
# File lib/oflow/stamp.rb, line 33 def to_s() "#{@location}-#{@op}@#{@time.iso8601(9)}" end
Also aliased as: inspect
where()
click to toggle source
Returns a string composed of the location and operation.
# File lib/oflow/stamp.rb, line 28 def where() "#{@location}-#{@op}" end