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.



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

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

Instance Attribute Details

#timeObject (readonly)

Returns the value of attribute time.



162
163
164
# File 'lib/process-helper.rb', line 162

def time
  @time
end