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.



166
167
168
169
170
# File 'lib/process-helper.rb', line 166

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

Instance Attribute Details

#timeObject (readonly)

Returns the value of attribute time.



164
165
166
# File 'lib/process-helper.rb', line 164

def time
  @time
end