Class: Cartoonist::RootPath

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

Constant Summary collapse

@@all =
[]
@@paths =
{}

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



220
221
222
# File 'lib/cartoonist.rb', line 220

def [](key)
  @@paths[key.to_sym]
end

.add(path_name, path) ⇒ Object



215
216
217
218
# File 'lib/cartoonist.rb', line 215

def add(path_name, path)
  (@@all << path_name.to_sym).sort! unless @@all.include? path_name.to_sym
  @@paths[path_name.to_sym] = path unless @@paths.include? path_name.to_sym
end

.allObject



211
212
213
# File 'lib/cartoonist.rb', line 211

def all
  @@all
end

.currentObject



228
229
230
# File 'lib/cartoonist.rb', line 228

def current
  self[current_key]
end

.current_keyObject



224
225
226
# File 'lib/cartoonist.rb', line 224

def current_key
  Setting[:root_path]
end