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.



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

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

#namenil

A stubbed timezone name.



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

def name
  nil
end

#to_sString

A stubbed timezone display 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.



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

def valid?
  false
end