Class: Timezone::NilZone

Inherits:
Object
  • Object
show all
Defined in:
lib/timezone/nil_zone.rb

Overview

A “nil” timezone object - representative of a missing timezone.

Instance Method Summary collapse

Instance Method Details

#inspectString

A stubbed timezone debug string.

Returns:

  • (String)


21
22
23
# File 'lib/timezone/nil_zone.rb', line 21

def inspect
  '#<Timezone::NilZone>'.freeze
end

#namenil

A stubbed timezone name.

Returns:

  • (nil)


7
8
9
# File 'lib/timezone/nil_zone.rb', line 7

def name
  nil
end

#to_sString

A stubbed timezone display string.

Returns:

  • (String)


14
15
16
# File 'lib/timezone/nil_zone.rb', line 14

def to_s
  'NilZone'.freeze
end

#valid?false

If this is a valid timezone.

Returns:

  • (false)


28
29
30
# File 'lib/timezone/nil_zone.rb', line 28

def valid?
  false
end