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)


23
24
25
# File 'lib/timezone/nil_zone.rb', line 23

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

#namenil

A stubbed timezone name.

Returns:

  • (nil)


9
10
11
# File 'lib/timezone/nil_zone.rb', line 9

def name
  nil
end

#to_sString

A stubbed timezone display string.

Returns:

  • (String)


16
17
18
# File 'lib/timezone/nil_zone.rb', line 16

def to_s
  'NilZone'
end

#valid?false

If this is a valid timezone.

Returns:

  • (false)


30
31
32
# File 'lib/timezone/nil_zone.rb', line 30

def valid?
  false
end