Class: Icalendar::TimezoneStore
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Icalendar::TimezoneStore
- Defined in:
- lib/icalendar/timezone_store.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TimezoneStore
constructor
A new instance of TimezoneStore.
- #retrieve(tzid) ⇒ Object
- #store(timezone) ⇒ Object
Constructor Details
#initialize ⇒ TimezoneStore
Returns a new instance of TimezoneStore.
7 8 9 |
# File 'lib/icalendar/timezone_store.rb', line 7 def initialize super DowncasedHash.new({}) end |
Class Method Details
.instance ⇒ Object
11 12 13 14 |
# File 'lib/icalendar/timezone_store.rb', line 11 def self.instance warn "**** DEPRECATION WARNING ****\nTimezoneStore.instance will be removed in 3.0. Please instantiate a TimezoneStore object." @instance ||= new end |
.retrieve(tzid) ⇒ Object
21 22 23 24 |
# File 'lib/icalendar/timezone_store.rb', line 21 def self.retrieve(tzid) warn "**** DEPRECATION WARNING ****\nTimezoneStore.retrieve will be removed in 3.0. Please use instance methods." instance.retrieve tzid end |
.store(timezone) ⇒ Object
16 17 18 19 |
# File 'lib/icalendar/timezone_store.rb', line 16 def self.store(timezone) warn "**** DEPRECATION WARNING ****\nTimezoneStore.store will be removed in 3.0. Please use instance methods." instance.store timezone end |
Instance Method Details
#retrieve(tzid) ⇒ Object
30 31 32 |
# File 'lib/icalendar/timezone_store.rb', line 30 def retrieve(tzid) self[tzid] end |
#store(timezone) ⇒ Object
26 27 28 |
# File 'lib/icalendar/timezone_store.rb', line 26 def store(timezone) self[timezone.tzid] = timezone end |