Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/charmkit/extend/string_tools.rb
Instance Method Summary collapse
-
#classify ⇒ Object
Simple classify to rename our hooks to their proper class.
Instance Method Details
#classify ⇒ Object
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 |