Class: Svenbot::Repo

Inherits:
Object
  • Object
show all
Defined in:
lib/svenbot/repo.rb

Overview

A subversion repository on the filesystem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ Repo

Create a new Repo.



8
9
10
# File 'lib/svenbot/repo.rb', line 8

def initialize(dir)
  @dir = dir
end

Instance Attribute Details

#dirObject (readonly)

The directory the repository lives in.



5
6
7
# File 'lib/svenbot/repo.rb', line 5

def dir
  @dir
end

Instance Method Details

#make_meta_dirObject

Create the meta directory if needed.



19
20
21
# File 'lib/svenbot/repo.rb', line 19

def make_meta_dir
  Dir.mkdir(meta_dir) unless File.directory?(meta_dir)
end

#meta_dirObject

Return a directory within the repository for use by svenbot. Defaults to a subdirectory “svenbot”.



14
15
16
# File 'lib/svenbot/repo.rb', line 14

def meta_dir
  return "#{dir}/svenbot"
end