Class: Symbol
Overview
Symbol extensions.
Instance Method Summary collapse
-
#/(o) ⇒ Object
Concatenates a path (purely sugar).
-
#to_header_name ⇒ Object
Converts a symbol into an HTTP header name.
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_name ⇒ Object
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 |