Class: TZInfo::TimezoneInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/tzinfo/timezone_info.rb

Overview

Represents a timezone defined by a data source.

Direct Known Subclasses

DataTimezoneInfo, LinkedTimezoneInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier) ⇒ TimezoneInfo

Constructs a new TimezoneInfo with an identifier.



9
10
11
# File 'lib/tzinfo/timezone_info.rb', line 9

def initialize(identifier)
  @identifier = identifier
end

Instance Attribute Details

#identifierObject (readonly)

The timezone identifier.



6
7
8
# File 'lib/tzinfo/timezone_info.rb', line 6

def identifier
  @identifier
end

Instance Method Details

#create_timezoneObject

Constructs a Timezone instance for the timezone represented by this TimezoneInfo.



20
21
22
# File 'lib/tzinfo/timezone_info.rb', line 20

def create_timezone
  raise_not_implemented('create_timezone')
end

#inspectObject

Returns internal object state as a programmer-readable string.



14
15
16
# File 'lib/tzinfo/timezone_info.rb', line 14

def inspect
  "#<#{self.class}: #@identifier>"
end