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.
9 10 11 |
# File 'lib/icalendar/timezone_store.rb', line 9 def initialize super DowncasedHash.new({}) end |
Class Method Details
.instance ⇒ Object
13 14 15 16 |
# File 'lib/icalendar/timezone_store.rb', line 13 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
23 24 25 26 |
# File 'lib/icalendar/timezone_store.rb', line 23 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
18 19 20 21 |
# File 'lib/icalendar/timezone_store.rb', line 18 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
32 33 34 |
# File 'lib/icalendar/timezone_store.rb', line 32 def retrieve(tzid) self[tzid] end |
#store(timezone) ⇒ Object
28 29 30 |
# File 'lib/icalendar/timezone_store.rb', line 28 def store(timezone) self[timezone.tzid] = timezone end |