Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/string_ext.rb

Instance Method Summary collapse

Instance Method Details

#namespaceObject



15
16
17
# File 'lib/string_ext.rb', line 15

def namespace
  self.to_page_title.split('.')[0]
end

#short_page_titleObject



11
12
13
# File 'lib/string_ext.rb', line 11

def short_page_title
  self.to_page_title.split('.')[1]
end

#to_file_pathObject

not Windows compatible



3
4
5
# File 'lib/string_ext.rb', line 3

def to_file_path
  self.gsub(".", "/")
end

#to_page_titleObject



7
8
9
# File 'lib/string_ext.rb', line 7

def to_page_title
  self.gsub("/", ".")
end