Class: Vpim::Repo::Directory

Inherits:
Vpim::Repo show all
Defined in:
lib/vpim/repo.rb

Defined Under Namespace

Classes: Calendar

Instance Method Summary collapse

Constructor Details

#initialize(where = ".") ⇒ Directory

Returns a new instance of Directory.



172
173
174
# File 'lib/vpim/repo.rb', line 172

def initialize(where = ".")
  @where = where.to_str
end

Instance Method Details

#eachObject

:nodoc:



176
177
178
179
180
181
# File 'lib/vpim/repo.rb', line 176

def each #:nodoc:
  Dir[ File.expand_path(@where + "/**/*.ics") ].each do |file|
    yield Calendar.new(file)
  end
  self
end