Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/string_ext.rb
Instance Method Summary collapse
- #namespace ⇒ Object
- #short_page_title ⇒ Object
-
#to_file_path ⇒ Object
not Windows compatible.
- #to_page_title ⇒ Object
Instance Method Details
#namespace ⇒ Object
15 16 17 |
# File 'lib/string_ext.rb', line 15 def namespace self.to_page_title.split('.')[0] end |
#short_page_title ⇒ Object
11 12 13 |
# File 'lib/string_ext.rb', line 11 def short_page_title self.to_page_title.split('.')[1] end |
#to_file_path ⇒ Object
not Windows compatible
3 4 5 |
# File 'lib/string_ext.rb', line 3 def to_file_path self.gsub(".", "/") end |
#to_page_title ⇒ Object
7 8 9 |
# File 'lib/string_ext.rb', line 7 def to_page_title self.gsub("/", ".") end |