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:
114 115 116 |
# File 'lib/vpim/repo.rb', line 114 def initialize(dir) # :nodoc: @dir = dir end |
Instance Method Details
#displayed ⇒ Object
:nodoc:
126 127 128 |
# File 'lib/vpim/repo.rb', line 126 def displayed #:nodoc: 1 == plist("Checked") end |
#each(klass = nil, &block) ⇒ Object
:nodoc:
130 131 132 133 134 135 136 137 138 |
# File 'lib/vpim/repo.rb', line 130 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:
140 141 142 143 144 |
# File 'lib/vpim/repo.rb', line 140 def encode #:nodoc: Icalendar.create2 do |cal| each{|c| cal << c} end.encode end |
#name ⇒ Object
:nodoc:
122 123 124 |
# File 'lib/vpim/repo.rb', line 122 def name #:nodoc: plist "Title" end |
#plist(key) ⇒ Object
:nodoc:
118 119 120 |
# File 'lib/vpim/repo.rb', line 118 def plist(key) #:nodoc: Plist::parse_xml( @dir + "/Info.plist")[key] end |