Module Cms::Extensions::String
In: lib/cms/extensions/string.rb

Methods

indent   markdown   pluralize   to_slug  

Public Instance methods

[Source]

   # File lib/cms/extensions/string.rb, line 4
4:       def indent(n=0)
5:         (" "*n.to_i) + self 
6:       end

[Source]

   # File lib/cms/extensions/string.rb, line 7
7:       def markdown
8:         Cms.markdown? ? Markdown.new(self).to_html : "<strong>ERROR</strong>: Markdown Support Not Installed"   
9:       end

[Source]

    # File lib/cms/extensions/string.rb, line 13
13:       def pluralize(count=nil)
14:         count == 1 ? self : ActiveSupport::Inflector.pluralize(self)
15:       end

[Source]

    # File lib/cms/extensions/string.rb, line 10
10:       def to_slug
11:         gsub(/\W+/, ' ').strip.downcase.gsub(/\ +/, '-')
12:       end

[Validate]