Sha256: dabaa64523c07a19b60e943c5204e58559b92f46536ed542ce7914949ca1cf18
Contents?: true
Size: 878 Bytes
Versions: 1
Compression:
Stored size: 878 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' module EacCli class Speaker module Options common_concern do enable_listable lists.add_symbol :option, :out_out, :err_out, :in_in, :parent, :err_line_prefix, :ignore_case end def err_out option(OPTION_ERR_OUT, $stderr) end def out_out option(OPTION_OUT_OUT, $stdout) end def in_in option(OPTION_IN_IN, $stdin) end # @return [Boolean] def ignore_case option(OPTION_IGNORE_CASE, nil) end def err_line_prefix option(OPTION_ERR_LINE_PREFIX, '') end def parent options[OPTION_PARENT] end def option(key, default) options[key] || parent.if_present(default) { |v| v.send(__METHOD__) } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eac_cli-0.42.0 | lib/eac_cli/speaker/options.rb |