trailofbits/http-security

View on GitHub
lib/http/security/headers/pragma.rb

Summary

Maintainability
A
20 mins
Test Coverage
module HTTP
  module Security
    module Headers
      class Pragma

        def initialize(directives={})
          @no_cache = directives[:no_cache]
        end

        def no_cache?
          !!@no_cache
        end

        def to_s
          str = ''
          str << 'no-cache' if @no_cache

          return str
        end

      end
    end
  end
end