Sha256: a816816619c480dcc6d93359db35ce30e5b5110ca163dd3376a07f69da4624d1

Contents?: true

Size: 311 Bytes

Versions: 1

Compression:

Stored size: 311 Bytes

Contents

# encoding: utf-8
require 'iso-init/version'

module IsoInit
  def self.included(base)
    base.extend(Isolator)
  end

  module Isolator
    def new(*args, &block)
      super(*args.map(&(Isolator.method(:isolate))), &block)
    end

    def self.isolate(arg)
      arg.dup.freeze rescue arg
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iso-init-0.0.1 lib/iso-init.rb