Class: Icalendar::Timezone

Inherits:
Component show all
Defined in:
lib/icalendar/timezone.rb

Defined Under Namespace

Modules: TzProperties Classes: Daylight, Standard

Instance Attribute Summary

Attributes inherited from Component

#ical_name, #name, #parent

Instance Method Summary collapse

Methods inherited from Component

#new_uid, #to_ical

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

#initializeTimezone

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

Returns:

  • (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