Module: TechnoGate::Contao

Defined in:
lib/contao.rb,
lib/contao/compiler.rb,
lib/contao/notifier.rb,
lib/contao/application.rb,
lib/contao/javascript_compiler.rb,
lib/contao/stylesheet_compiler.rb,
lib/contao/coffeescript_compiler.rb

Defined Under Namespace

Classes: Application, CoffeescriptCompiler, Compiler, JavascriptCompiler, Notifier, RootNotSet, StylesheetCompiler

Class Method Summary collapse

Class Method Details

.envSymbol

Get the currently running environment

Returns:

  • (Symbol)

    Currently running environment



13
14
15
# File 'lib/contao.rb', line 13

def self.env
  @@env
end

.env=(env) ⇒ Object

Set the environment

Parameters:

  • Environment (Symbol)


20
21
22
# File 'lib/contao.rb', line 20

def self.env=(env)
  @@env = env
end

.expandify(path) ⇒ Pathname

Expandify a path

raises RootNotSet

Parameters:

  • Path (String)

Returns:

  • (Pathname)

    Path converted to absolute path

Raises:



43
44
45
46
47
48
49
50
51
# File 'lib/contao.rb', line 43

def self.expandify(path)
  raise RootNotSet unless root

  if path.to_s.start_with? "/"
    Pathname(path).expand_path
  else
    root.join(path)
  end
end

.rootSymbol

Get the currently running rootironment

Returns:

  • (Symbol)

    Currently running rootironment



27
28
29
# File 'lib/contao.rb', line 27

def self.root
  @@root
end

.root=(root) ⇒ Object

Set the rootironment

Parameters:

  • rootironment (Symbol)


34
35
36
# File 'lib/contao.rb', line 34

def self.root=(root)
  @@root = Pathname.new(root).expand_path
end