Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/charmkit/extend/string_tools.rb

Instance Method Summary collapse

Instance Method Details

#classifyObject

Simple classify to rename our hooks to their proper class

charmkit config-changed

This will load config-changed.rb and classify it’s name to ConfigChanged.

Note most libraries use ‘_’(underscore) for word separation whereas Juju hooks are ‘-’(hyphenated).



11
12
13
# File 'lib/charmkit/extend/string_tools.rb', line 11

def classify
  return self.split('-').collect!{ |w| w.capitalize }.join
end