Sha256: a65b1550298a8243ac0058f868f7fbecdb11141d307f5a3a209fefbf11cd66bc

Contents?: true

Size: 497 Bytes

Versions: 32

Compression:

Stored size: 497 Bytes

Contents

# frozen_string_literal: true

require_relative 'tags'
require_relative 'nested_hash'
require_relative 'cleanup'

module Doing
  class ::Array
    include ArrayTags
    include ArrayNestedHash
    include ArrayCleanup
    ##
    ## Force UTF-8 encoding of strings in array
    ##
    ## @return     [Array] Encoded lines
    ##
    def utf8
      c = self.class
      if String.method_defined? :force_encoding
        replace c.new(map(&:utf8))
      else
        self
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
doing-2.1.80 lib/doing/array/array.rb
doing-2.1.79 lib/doing/array/array.rb
doing-2.1.78 lib/doing/array/array.rb
doing-2.1.77 lib/doing/array/array.rb
doing-2.1.76 lib/doing/array/array.rb
doing-2.1.75 lib/doing/array/array.rb
doing-2.1.74 lib/doing/array/array.rb
doing-2.1.73 lib/doing/array/array.rb
doing-2.1.72 lib/doing/array/array.rb
doing-2.1.69 lib/doing/array/array.rb
doing-2.1.68 lib/doing/array/array.rb
doing-2.1.66 lib/doing/array/array.rb
doing-2.1.65 lib/doing/array/array.rb
doing-2.1.64 lib/doing/array/array.rb
doing-2.1.63 lib/doing/array/array.rb
doing-2.1.62 lib/doing/array/array.rb
doing-2.1.61 lib/doing/array/array.rb
doing-2.1.60 lib/doing/array/array.rb
doing-2.1.58 lib/doing/array/array.rb
doing-2.1.57 lib/doing/array/array.rb