class TZInfo::TimezoneInfo
Represents a timezone defined by a data source.
Attributes
identifier[R]
The timezone identifier.
Public Class Methods
new(identifier)
click to toggle source
Constructs a new TimezoneInfo
with an identifier.
# File lib/tzinfo/timezone_info.rb, line 9 def initialize(identifier) @identifier = identifier end
Public Instance Methods
create_timezone()
click to toggle source
Constructs a Timezone
instance for the timezone represented by this TimezoneInfo
.
# File lib/tzinfo/timezone_info.rb, line 20 def create_timezone raise_not_implemented('create_timezone') end
inspect()
click to toggle source
Returns internal object state as a programmer-readable string.
# File lib/tzinfo/timezone_info.rb, line 14 def inspect "#<#{self.class}: #@identifier>" end
Private Instance Methods
raise_not_implemented(method_name)
click to toggle source
# File lib/tzinfo/timezone_info.rb, line 26 def raise_not_implemented(method_name) raise NotImplementedError, "Subclasses must override #{method_name}" end