Top Level Namespace

Includes:
Dropsite

Defined Under Namespace

Modules: Dropsite Classes: ImageThumbnails, SimpleIndex, Tty

Constant Summary collapse

PLUGINS_DIR =
File.join(File.dirname(__FILE__), 'plugins')

Constants included from Dropsite

Dropsite::VERSION

Instance Method Summary collapse

Methods included from Dropsite

#dropbox_dir, #dropsite_config_dir, #home_dir

Instance Method Details

#underscorize(camel_cased_word) ⇒ Object

Convert a camel-cased string into a lowercase, underscore separated string



3
4
5
6
7
8
# File 'lib/dropsite/globals.rb', line 3

def underscorize(camel_cased_word)
  camel_cased_word.to_s.gsub(/::/, '/').
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
  gsub(/([a-z\d])([A-Z])/,'\1_\2').
  tr("-", "_").downcase
end