Sha256: ca9e52154c8d7a519f0dacfcfaa1351ff0b70e036e087fddd97cdc498817f21b

Contents?: true

Size: 514 Bytes

Versions: 35

Compression:

Stored size: 514 Bytes

Contents

module Cms
  module Extensions
    module String
      def indent(n=0)
        (" "*n.to_i) + self 
      end
      def markdown
        Cms.markdown? ? Markdown.new(self).to_html : "<strong>ERROR</strong>: Markdown Support Not Installed"   
      end 
      def to_slug
        gsub(/\W+/, ' ').strip.downcase.gsub(/\ +/, '-')
      end  
      def pluralize(count=nil)
        count == 1 ? self : ActiveSupport::Inflector.pluralize(self)
      end
    end
  end
end
String.send(:include, Cms::Extensions::String)

Version data entries

35 entries across 35 versions & 11 rubygems

Version Path
SFEley-browsercms-3.0.2 lib/cms/extensions/string.rb
buzzware-browsercms-3.0.2 lib/cms/extensions/string.rb
coredumplings-browsercms-3.0.0 lib/cms/extensions/string.rb
nate-browsercms-3.0.210 lib/cms/extensions/string.rb
nate-browsercms-3.0.211 lib/cms/extensions/string.rb
we5-browsercms-3.0.1.1 lib/cms/extensions/string.rb
webficient-browsercms-3.0.1 lib/cms/extensions/string.rb
webficient-browsercms-3.0.2 lib/cms/extensions/string.rb
webficient-browsercms-3.0.3 lib/cms/extensions/string.rb
webficient-browsercms-3.0.4 lib/cms/extensions/string.rb
browsercms-3.1.5 lib/cms/extensions/string.rb
browsercms-3.1.4 lib/cms/extensions/string.rb
browsercms-3.1.3 lib/cms/extensions/string.rb
bf4-browsercms-3.1.0 lib/cms/extensions/string.rb
drujensen-browsercms-3.2.0 lib/cms/extensions/string.rb
browsercmsi-3.1.2 lib/cms/extensions/string.rb
browsercms-3.1.2 lib/cms/extensions/string.rb
browsercms-3.1.1 lib/cms/extensions/string.rb
browsercmsi-3.1.1 lib/cms/extensions/string.rb
browsercmsi-3.1.0 lib/cms/extensions/string.rb