Class: Rad::Router::DefaultFormatProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/rad/router/_default_format_processor.rb

Instance Method Summary collapse

Instance Method Details

#add_format(path, format) ⇒ Object



2
3
4
5
# File 'lib/rad/router/_default_format_processor.rb', line 2

def add_format path, format
  path << ".#{format}"
  path
end

#remove_format(path) ⇒ Object



7
8
9
# File 'lib/rad/router/_default_format_processor.rb', line 7

def remove_format path
  path.sub(/\.[^\.]+$/, '')
end