Sha256: d8774ca32bde113774ad62cf711a95ceeb456c6d41b609f603f84cba25f59fca

Contents?: true

Size: 338 Bytes

Versions: 6

Compression:

Stored size: 338 Bytes

Contents

module Nyara
  class HeaderHash
    alias has_key? key?

    CONTENT_TYPE = 'Content-Type'.freeze

    def aref_content_type
      self._aref CONTENT_TYPE
    end

    def aset_content_type value
      unless value.index 'charset'
        value = "#{value}; charset=UTF-8"
      end
      self._aset CONTENT_TYPE, value
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nyara-0.0.1.pre.5 lib/nyara/hashes/header_hash.rb
nyara-0.0.1.pre.4 lib/nyara/hashes/header_hash.rb
nyara-0.0.1.pre.3 lib/nyara/hashes/header_hash.rb
nyara-0.0.1.pre.2 lib/nyara/header_hash.rb
nyara-0.0.1.pre.1 lib/nyara/header_hash.rb
nyara-0.0.1.pre lib/nyara/header_hash.rb