Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/genit/extensions/string_extension.rb
Instance Method Summary collapse
- #force_html_extension ⇒ Object
- #force_html_extension! ⇒ Object
- #haml_ext? ⇒ Boolean
- #markdown_ext? ⇒ Boolean
Instance Method Details
#force_html_extension ⇒ Object
5 6 7 |
# File 'lib/genit/extensions/string_extension.rb', line 5 def force_html_extension self.gsub /(markdown|haml)$/, 'html' end |
#force_html_extension! ⇒ Object
9 10 11 |
# File 'lib/genit/extensions/string_extension.rb', line 9 def force_html_extension! self.gsub! /(markdown|haml)$/, 'html' end |
#haml_ext? ⇒ Boolean
17 18 19 |
# File 'lib/genit/extensions/string_extension.rb', line 17 def haml_ext? self.end_with?('.haml') end |
#markdown_ext? ⇒ Boolean
13 14 15 |
# File 'lib/genit/extensions/string_extension.rb', line 13 def markdown_ext? self.end_with?('.markdown') end |