Class: Castle::Headers::Format

Inherits:
Object
  • Object
show all
Defined in:
lib/castle/headers/format.rb

Overview

formats header name

Class Method Summary collapse

Class Method Details

.call(header) ⇒ String

Parameters:

  • header (String)

Returns:

  • (String)


10
11
12
# File 'lib/castle/headers/format.rb', line 10

def call(header)
  format(header.to_s.gsub(/^HTTP(?:_|-)/i, ''))
end