#!/usr/bin/env ruby # frozen_string_literal: true require "dorian/arguments" require_relative "../lib/dorian/eval" parsed = Dorian::Arguments.parse( it: { type: :string, alias: :i }, debug: { alias: :d }, stdout: { aliases: %i[out o], default: true }, stderr: { aliases: %i[err e], default: true }, colorize: { aliases: %i[color c], default: true }, rails: { alias: :r }, version: { alias: :v }, help: { alias: :h } ) abort parsed.help if parsed.options.help if parsed.options.version abort File.read(File.expand_path("../VERSION", __dir__)) end Dorian::Eval.eval( ruby: parsed.arguments.join(" "), it: parsed.options.it, debug: parsed.options.debug, stdout: parsed.options.stdout, stderr: parsed.options.stderr, colorize: parsed.options.colorize, rails: parsed.options.rails )