class Eceval::CLI::Command

Public Instance Methods

call(path:, require:, load_path:, **) click to toggle source
# File lib/eceval/cli.rb, line 30
def call(path:, require:, load_path:, **)
  $LOAD_PATH.unshift(*load_path)
  require.each { |lib| require lib }

  if path == '-'
    Eceval.augment($stdin, filename: "[STDIN]")
  else
    File.open(path) do |file|
      Eceval.augment(file, filename: path)
    end
  end
end