module Thor::Util
def self.namespace_from_thor_class(constant, remove_default=true)
String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz"
==== Returns
constant
def self.namespace_from_thor_class(constant, remove_default=true) constant = constant.to_s.gsub(/^Thor::Sandbox::/, "") constant = snake_case(constant).squeeze(":") constant.gsub!(/^default/, '') if remove_default constant end