Sha256: 2aa1b6de7e45a08eaa5f2c0e450db95dfa34114cea379a8dfb6a85942e51a552

Contents?: true

Size: 521 Bytes

Versions: 30

Compression:

Stored size: 521 Bytes

Contents

module Nexmo
  module OAS
    module Renderer
      module Filters
        class Unfreeze < Banzai::Filter
          def call(input)
            input.gsub!('FREEZESTARTFREEZEEND', '')
            input.gsub!('<p>FREEZESTART', 'FREEZESTART')
            input.gsub!('FREEZEEND</p>', 'FREEZEEND')

            input.gsub!(/FREEZESTART(.+?)FREEZEEND/m) do |_s|
              Base64.urlsafe_decode64($1).force_encoding(Encoding::UTF_8)
            end
            input
          end
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
nexmo-oas-renderer-0.7.1 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.7.0 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.6.6 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.6.5 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.6.4 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.6.3 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.6.2 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.6.1 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.5.6 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.5.5 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.5.4 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.5.2 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.5.1 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.5.0 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.4.1 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.4.0 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.3.7 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.3.6 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.3.5 lib/nexmo/oas/renderer/filters/unfreeze.rb
nexmo-oas-renderer-0.3.4 lib/nexmo/oas/renderer/filters/unfreeze.rb