Class: Icalendar::Timezone
- Defined in:
- lib/icalendar/timezone.rb
Defined Under Namespace
Modules: TzProperties Classes: Daylight, Standard
Instance Attribute Summary
Attributes inherited from Component
Instance Method Summary collapse
-
#initialize ⇒ Timezone
constructor
A new instance of Timezone.
- #valid?(strict = false) ⇒ Boolean
Methods inherited from Component
Methods included from HasComponents
#add_component, included, #method_missing, #respond_to_missing?
Methods included from HasProperties
#append_custom_property, #custom_property, included, #method_missing, #property, #respond_to_missing?
Constructor Details
#initialize ⇒ Timezone
Returns a new instance of Timezone.
42 43 44 |
# File 'lib/icalendar/timezone.rb', line 42 def initialize super 'timezone' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Icalendar::HasComponents
Instance Method Details
#valid?(strict = false) ⇒ Boolean
46 47 48 49 50 51 |
# File 'lib/icalendar/timezone.rb', line 46 def valid?(strict = false) daylights.empty? && standards.empty? and return false daylights.all? { |d| d.valid? strict } or return false standards.all? { |s| s.valid? strict } or return false super end |