symbiosis.rb 416 Bytes
Newer Older
1
2
3
4
#
# This module contains all the classes that are needed for Bytemark Symbiosis.
#
module Symbiosis
telyn's avatar
telyn committed
5
6
7
  def root
    @@root || '/'
  end
8

telyn's avatar
telyn committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  def root=(new_root)
    @@root = new_root
  end

  def prefix
    @@prefix || '/srv'
  end

  def prefix=(new_prefix)
    @@prefix = new_prefix
  end

  def path_to(path)
    File.join(root, path)
  end

  def path_in_prefix_to(path)
    File.join(root, prefix, path)
  end
28
end