Sha256: dc5cf187cf79b336ae26067d47e8648c28afa4a9df3a61184ae28c8d791bf51a

Contents?: true

Size: 405 Bytes

Versions: 12

Compression:

Stored size: 405 Bytes

Contents

# frozen_string_literal: true

class Recog::Fingerprint::Test
  attr_accessor :content, :attributes

  def initialize(content, attributes = [])
    @attributes = attributes

    @content = if @attributes['_encoding'] && @attributes['_encoding'] == 'base64'
                 content.to_s.unpack1('m*')
               else
                 content
               end
  end

  def to_s
    content
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
recog-3.1.13 lib/recog/fingerprint/test.rb
recog-3.1.12 lib/recog/fingerprint/test.rb
recog-3.1.11 lib/recog/fingerprint/test.rb
recog-3.1.10 lib/recog/fingerprint/test.rb
recog-3.1.9 lib/recog/fingerprint/test.rb
recog-3.1.8 lib/recog/fingerprint/test.rb
recog-3.1.7 lib/recog/fingerprint/test.rb
recog-3.1.6 lib/recog/fingerprint/test.rb
recog-3.1.5 lib/recog/fingerprint/test.rb
recog-3.1.4 lib/recog/fingerprint/test.rb
recog-3.1.3 lib/recog/fingerprint/test.rb
recog-3.1.2 lib/recog/fingerprint/test.rb