Class: Symbol

Inherits:
Object show all
Defined in:
lib/serverside/core_ext.rb

Overview

Symbol extensions.

Instance Method Summary collapse

Instance Method Details

#/(o) ⇒ Object

Concatenates a path (purely sugar)



67
68
69
# File 'lib/serverside/core_ext.rb', line 67

def /(o)
  File.join(self, o.to_s)
end

#to_header_nameObject

Converts a symbol into an HTTP header name



72
73
74
# File 'lib/serverside/core_ext.rb', line 72

def to_header_name
  to_s.split('_').map {|p| p.capitalize}.join('-')
end