Class: TZInfo::TZDataLink
- Inherits:
-
TZDataDefinition
- Object
- TZDataDefinition
- TZInfo::TZDataLink
- Defined in:
- lib/tzinfo/tzdataparser.rb
Overview
A tz data Link.
Instance Attribute Summary collapse
-
#link_to ⇒ Object
readonly
:nodoc:.
Attributes inherited from TZDataDefinition
#name, #name_elements, #path_elements
Instance Method Summary collapse
-
#initialize(name, link_to) ⇒ TZDataLink
constructor
A new instance of TZDataLink.
-
#write_index_record(file) ⇒ Object
Writes an index record for this link.
-
#write_module(output_dir) ⇒ Object
Writes a module for this link.
Methods inherited from TZDataDefinition
Constructor Details
#initialize(name, link_to) ⇒ TZDataLink
Returns a new instance of TZDataLink.
545 546 547 548 |
# File 'lib/tzinfo/tzdataparser.rb', line 545 def initialize(name, link_to) super(name) @link_to = link_to end |
Instance Attribute Details
#link_to ⇒ Object (readonly)
:nodoc:
543 544 545 |
# File 'lib/tzinfo/tzdataparser.rb', line 543 def link_to @link_to end |
Instance Method Details
#write_index_record(file) ⇒ Object
Writes an index record for this link.
560 561 562 |
# File 'lib/tzinfo/tzdataparser.rb', line 560 def write_index_record(file) file.puts(" linked_timezone #{TZDataParser.quote_str(@name)}") end |
#write_module(output_dir) ⇒ Object
Writes a module for this link.
551 552 553 554 555 556 557 |
# File 'lib/tzinfo/tzdataparser.rb', line 551 def write_module(output_dir) puts "writing link #{name}" create_file(output_dir) {|file| file.puts("linked_timezone #{TZDataParser.quote_str(@name)}, #{TZDataParser.quote_str(@link_to.name)}") } end |