Sha256: bb6be34f5245e3a9c4dfa4495c60bfd453ba85ea84cb08437c9e488f63814748
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true module Mutant # Base class for code loaders class Loader include Anima.new(:binding, :kernel, :source, :subject) FROZEN_STRING_FORMAT = "# frozen_string_literal: true\n%s" private_constant(*constants(false)) # Call loader # # @return [self] def self.call(*arguments) new(*arguments).call end # Call loader # # One off the very few valid uses of eval # # @return [undefined] def call kernel.eval( FROZEN_STRING_FORMAT % source, binding, subject.source_path.to_s, subject.source_line ) end end # Loader end # Mutant
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mutant-0.8.24 | lib/mutant/loader.rb |