Class: When::V::Alarm
- Inherits:
-
Event
- Object
- BasicTypes::Object
- Root
- Event
- When::V::Alarm
- Defined in:
- lib/when_exe/icalendar.rb
Overview
Alarm を定義する
BEGIN:VALARM...END:VALARM のブロックに対応
Constant Summary
Constants inherited from Event
Event::Classes, Event::Properties
Constants inherited from Root
Root::AwareProperties, Root::Classes, Root::DefaultOptional, Root::DefaultUnique, Root::Properties
Constants included from Parts::Resource
Parts::Resource::ConstList, Parts::Resource::ConstTypes, Parts::Resource::IRIDecode, Parts::Resource::IRIDecodeTable, Parts::Resource::IRIEncode, Parts::Resource::IRIEncodeTable, Parts::Resource::IRIHeader, Parts::Resource::LabelProperty
Instance Attribute Summary
Attributes inherited from Event
#dtend, #dtstart, #duration, #exdate, #first_occurrence, #google_api_props, #rdate, #rrule, #summary
Attributes inherited from Root
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#initialize(options) ⇒ Alarm
constructor
A new instance of Alarm.
-
#label ⇒ String
ユニーク識別名 - ACTION Property をユニーク識別名とする。.
Methods inherited from Event
#_enumerator_list, _setup_, _setup_info, default_until, #dtstop, #each, gcal2ical, #to_gcalevent
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Methods inherited from Root
Methods included from Parts::Resource
#[], #^, _abbreviation_to_iri, _decode, _encode, _extract_prefix, _instance, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?, root_dir
Constructor Details
#initialize(options) ⇒ Alarm
Returns a new instance of Alarm.
742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/when_exe/icalendar.rb', line 742 def initialize() # 包含関係 @_pool = {} @_pool['..'] = ['..'] # parsed 部の属性化 _parsed() # 属性の存在チェック case (@property['action'].kind_of?(When::Parts::Resource::ContentLine) && @property['action'].object) when 'AUDIO' aware = _attribute_appearance([ ['action', 'trigger'], [], ['duration', 'repeat', 'attach'], [], []]) when 'DISPLAY' aware = _attribute_appearance([ ['action', 'description', 'trigger'], [], ['duration', 'repeat'], [], []]) when 'EMAIL' aware = _attribute_appearance([ ['action', 'description', 'trigger', 'summary'], ['attendee'], ['duration', 'repeat'], [], ['attach']]) else raise ArgumentError, "The ACTION is invalid" end # 属性の設定 _initialize_attributes(aware) # 包含オブジェクトがないことの確認 _child(, []) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Method Details
#label ⇒ String
ユニーク識別名 - ACTION Property をユニーク識別名とする。
737 738 739 |
# File 'lib/when_exe/icalendar.rb', line 737 def label @label ||= @property['action'].object # TODO end |