Class: FmRest::StringDateTime

Inherits:
StringDate show all
Defined in:
lib/fmrest/string_date.rb

Constant Summary collapse

DELEGATE_CLASS =
::DateTime

Instance Method Summary collapse

Methods inherited from StringDate

#+, #<<, #<=>, #==, #between?, #in_time_zone, #initialize, #inspect, strptime, #to_time, #upto

Constructor Details

This class inherits a constructor from FmRest::StringDate

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FmRest::StringDate

Instance Method Details

#is_a?(klass) ⇒ Boolean Also known as: kind_of?

Returns:

  • (Boolean)


175
176
177
# File 'lib/fmrest/string_date.rb', line 175

def is_a?(klass)
  klass == ::DateTime || super
end

#to_dateObject



180
181
182
# File 'lib/fmrest/string_date.rb', line 180

def to_date
  @delegate.to_date
end

#to_datetimeObject



184
185
186
# File 'lib/fmrest/string_date.rb', line 184

def to_datetime
  @delegate
end