Sha256: ddc95ec25bd992db7b8724f8661264f098e9cfba952682e3fd7ad02e4de4aaaf

Contents?: true

Size: 312 Bytes

Versions: 1

Compression:

Stored size: 312 Bytes

Contents

# -*- encoding: utf-8 -*-

class String

  def force_html_extension
    self.gsub /(markdown|haml)$/, 'html'
  end
  
  def force_html_extension!
    self.gsub! /(markdown|haml)$/, 'html'
  end
  
  def markdown_ext?
    self.end_with?('.markdown')
  end
  
  def haml_ext?
    self.end_with?('.haml')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
genit-2.1 lib/genit/extensions/string_extension.rb