Class: Castle::HeaderFormatter
- Inherits:
-
Object
- Object
- Castle::HeaderFormatter
- Defined in:
- lib/castle/header_formatter.rb
Instance Method Summary collapse
Instance Method Details
#call(header) ⇒ Object
5 6 7 |
# File 'lib/castle/header_formatter.rb', line 5 def call(header) header.to_s.gsub(/^HTTP(?:_|-)/i, '').split(/_|-/).map(&:capitalize).join('-') end |