Sha256: 0c9d95a49c8c1a0e7cc90f5d9992c1f8a700895248a27d0a3cf9e8f6abcf06cb
Contents?: true
Size: 411 Bytes
Versions: 7
Compression:
Stored size: 411 Bytes
Contents
# frozen_string_literal: true require 'image_size/reader' class ImageSize class StringReader # :nodoc: include Reader def initialize(string) @string = if string.respond_to?(:encoding) && string.encoding.name != 'ASCII-8BIT' string.dup.force_encoding('ASCII-8BIT') else string end end def [](offset, length) @string[offset, length] end end end
Version data entries
7 entries across 7 versions & 1 rubygems