Method: TZInfo::TimeOrDateTime#to_s

Defined in:
lib/tzinfo/time_or_datetime.rb

#to_sObject

Returns a string representation of the TimeOrDateTime.



107
108
109
110
111
112
113
114
115
# File 'lib/tzinfo/time_or_datetime.rb', line 107

def to_s
  if @orig.is_a?(Time)
    "Time: #{@orig.to_s}"
  elsif @orig.is_a?(DateTime)
    "DateTime: #{@orig.to_s}"
  else
    "Timestamp: #{@orig.to_s}"
  end
end