2020-11-23 12:09:16 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-05-27 20:49:53 +08:00
|
|
|
require_relative 'youplot/version'
|
|
|
|
require_relative 'youplot/dsv'
|
|
|
|
require_relative 'youplot/parameters'
|
|
|
|
require_relative 'youplot/command'
|
2020-11-23 12:09:16 +08:00
|
|
|
|
|
|
|
module YouPlot
|
2021-07-12 13:49:23 +08:00
|
|
|
# @run_as_executable = true / false
|
|
|
|
# YouPlot behaves slightly differently when run as a command line tool
|
|
|
|
# and when run as a script (e.g. for testing). In the event of an error,
|
|
|
|
# when run as a command line tool, YouPlot will display a short error message
|
|
|
|
# and exit abnormally. When run as a script, it will just raise an error.
|
|
|
|
@run_as_executable = false
|
2021-01-19 23:07:23 +08:00
|
|
|
class << self
|
|
|
|
attr_accessor :run_as_executable
|
2021-01-19 23:57:56 +08:00
|
|
|
|
2021-01-19 23:07:23 +08:00
|
|
|
def run_as_executable?
|
|
|
|
@run_as_executable
|
|
|
|
end
|
|
|
|
end
|
2020-11-23 12:09:16 +08:00
|
|
|
end
|