Sha256: 6e5baf2489ab476e40f5bcf62167f28b8dec2365b56a8c945d3e93411c14d57a
Contents?: true
Size: 832 Bytes
Versions: 167
Compression:
Stored size: 832 Bytes
Contents
# frozen_string_literal: true require 'eac_cli/runner' require 'eac_ruby_utils/core_ext' require 'eac_ruby_utils/abstract_methods' module EacRubyBase0 module RunnerWith module Input STDIN_OPTION = '-' BLANK_OPTION = '+' DEFAULT_DEFAULT_INPUT_OPTION = BLANK_OPTION common_concern do enable_settings_provider include ::EacCli::Runner runner_definition do arg_opt '-i', '--input', 'Input from file.' end end def input_content case input_option when STDIN_OPTION then $stdin.read when BLANK_OPTION then '' else input_option.to_pathname.read end end def input_option parsed.input || setting_value(:default_input_option, default: DEFAULT_DEFAULT_INPUT_OPTION) end end end end
Version data entries
167 entries across 167 versions & 4 rubygems