Sha256: 30627a0d4c0444960c89601c5df48af9b40b39723895ba327ab2ec7dedb3b7a7

Contents?: true

Size: 956 Bytes

Versions: 4

Compression:

Stored size: 956 Bytes

Contents

require 'codily/elements/service_belongging_base'
require 'codily/elements/condition'

module Codily
  module Elements
    class Gzip < ServiceBelonggingBase
      def content_types(o = nil)
        o = case o
            when nil
              nil
            when String
              o
            when Array
              o.join(' ')
            end
        getset :content_types, o
      end

      def extensions(o = nil)
        o = case o
            when nil
              nil
            when String
              o
            when Array
              o.join(' ')
            end
        getset :extensions, o
      end

      def setup
        delete_if_empty! :cache_condition
      end

      def cache_condition(name = nil, &block)
        set_refer_element(:cache_condition, Condition, {name: name, type: 'CACHE', _service_name: self.service_name}, &block)
      end

      def fastly_class
        Fastly::Gzip
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
codily-0.3.1 lib/codily/elements/gzip.rb
codily-0.3.0 lib/codily/elements/gzip.rb
codily-0.2.0 lib/codily/elements/gzip.rb
codily-0.1.0.beta lib/codily/elements/gzip.rb