class Autorake::Directories

Constants

STD

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/autorake/directories.rb, line 26
def initialize
  super
  update STD
end

Public Instance Methods

[](key) click to toggle source
Calls superclass method
# File lib/autorake/directories.rb, line 31
def [] key
  super key.to_sym.downcase
end
[]=(key, value) click to toggle source
Calls superclass method
# File lib/autorake/directories.rb, line 35
def []= key, value
  super key.to_sym.downcase, value
end
expand(dir, file = nil) click to toggle source
# File lib/autorake/directories.rb, line 43
def expand dir, file = nil
  if file then
    dir = expand dir
    File.join dir, file
  else
    case dir
      when /\A[A-Z_0-9]+/ then (expand self[ $&.downcase]) + $'
      when /\A:(\w+)/     then (expand self[ $1         ]) + $'
      when /\A!/          then `#$'`[ /.*/]
      when /\A~/          then File.expand_path dir
      else                     dir
    end
  end
end
expanded(key) click to toggle source
# File lib/autorake/directories.rb, line 39
def expanded key
  expand self[ key]
end