Class: ProcessHelper::TimestampedString

Inherits:
String
  • Object
show all
Defined in:
lib/process-helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, time = nil) ⇒ TimestampedString

Returns a new instance of TimestampedString.



157
158
159
160
161
# File 'lib/process-helper.rb', line 157

def initialize(string, time = nil)
  time ||= Time.now
  super(string)
  @time = time
end

Instance Attribute Details

#timeObject (readonly)

Returns the value of attribute time.



155
156
157
# File 'lib/process-helper.rb', line 155

def time
  @time
end