Class: Vpim::Repo::Apple3::Calendar
- Defined in:
- lib/vpim/repo.rb
Instance Method Summary collapse
-
#displayed ⇒ Object
:nodoc:.
-
#each(klass = nil, &block) ⇒ Object
:nodoc:.
-
#encode ⇒ Object
:nodoc:.
-
#initialize(dir) ⇒ Calendar
constructor
:nodoc:.
-
#name ⇒ Object
:nodoc:.
-
#plist(key) ⇒ Object
:nodoc:.
Methods inherited from Calendar
Constructor Details
#initialize(dir) ⇒ Calendar
:nodoc:
113 114 115 |
# File 'lib/vpim/repo.rb', line 113 def initialize(dir) # :nodoc: @dir = dir end |
Instance Method Details
#displayed ⇒ Object
:nodoc:
125 126 127 |
# File 'lib/vpim/repo.rb', line 125 def displayed #:nodoc: 1 == plist("Checked") end |
#each(klass = nil, &block) ⇒ Object
:nodoc:
129 130 131 132 133 134 135 136 137 |
# File 'lib/vpim/repo.rb', line 129 def each(klass=nil, &block) #:nodoc: unless iterator? return Enumerable::Enumerator.new(self, :each, klass) end Dir[ @dir + "/Events/*.ics" ].map do |ics| file_each(ics, klass, &block) end self end |
#encode ⇒ Object
:nodoc:
139 140 141 142 143 |
# File 'lib/vpim/repo.rb', line 139 def encode #:nodoc: Icalendar.create2 do |cal| each{|c| cal << c} end.encode end |
#name ⇒ Object
:nodoc:
121 122 123 |
# File 'lib/vpim/repo.rb', line 121 def name #:nodoc: plist "Title" end |
#plist(key) ⇒ Object
:nodoc:
117 118 119 |
# File 'lib/vpim/repo.rb', line 117 def plist(key) #:nodoc: Plist::parse_xml( @dir + "/Info.plist")[key] end |