Top Level Namespace

Includes:
FileUtils

Defined Under Namespace

Modules: ArgParser, Build, Canuby, Config, Git, Logging, Outputs, Paths, Stage Classes: Project

Instance Method Summary collapse

Instance Method Details

#add_desc(task, comment) ⇒ Object

Add description to rake tasks that show up in help



40
41
42
# File 'lib/canuby/util.rb', line 40

def add_desc(task, comment)
  Rake.application[task].add_description(comment)
end

#build(project) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/canuby/build.rb', line 22

def build(project)
  if const_get(project).build_tool == 'msbuild'
    Build.msbuild(project, const_get(project).project_file)
  else
    logger.error("#{const_get(project).build_tool} isn't implemented yet")
  end
end

#const_get(string) ⇒ Object

Acces a constant from a string



35
36
37
# File 'lib/canuby/util.rb', line 35

def const_get(string)
  Object.const_get(string)
end

#const_set(string, klass) ⇒ Object

Creates an instance of the class with the name of string



30
31
32
# File 'lib/canuby/util.rb', line 30

def const_set(string, klass)
  Object.const_set(string, klass)
end

#loggerObject

Shortcut to logger



84
85
86
# File 'lib/canuby/util.rb', line 84

def logger
  Logging.logger
end