Sha256: 1028541dc2959b2d03344def955af93ed49182d3ea73c2599a47b4bcf7522609

Contents?: true

Size: 448 Bytes

Versions: 10

Compression:

Stored size: 448 Bytes

Contents

# Simple extension to manage Ruby encodings
module Middleman::CoreExtensions::RubyEncoding

  # Setup extension
  class << self

    # Once registerd
    def registered(app)
      app.send :include, InstanceMethods
    end

  end

  module InstanceMethods
    def initialize
      if Object.const_defined?(:Encoding)
        Encoding.default_internal = encoding
        Encoding.default_external = encoding
      end

      super
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
middleman-core-x86-mingw32-3.0.5 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-3.0.5 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-x86-mingw32-3.0.4 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-3.0.4 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-x86-mingw32-3.0.3 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-x86-mingw32-3.0.2 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-3.0.2 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-x86-mingw32-3.0.1 lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-x86-mingw32-3.0.1.pre lib/middleman-core/core_extensions/ruby_encoding.rb
middleman-core-3.0.1.pre lib/middleman-core/core_extensions/ruby_encoding.rb