Module: AgentXmpp::StandardLibrary::StringPatches::InstanceMethods
- Defined in:
- lib/agent_xmpp/patches/string.rb
Overview
Instance Method Summary collapse
-
#classify ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….…..
-
#humanize ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….…..
Instance Method Details
#classify ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….…..
10 11 12 |
# File 'lib/agent_xmpp/patches/string.rb', line 10 def classify split('_').collect{|s| s.capitalize}.join end |
#humanize ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….…..
15 16 17 |
# File 'lib/agent_xmpp/patches/string.rb', line 15 def humanize gsub(/_/, ' ') end |