Module: EacCli::Speaker::Options

Defined in:
lib/eac_cli/speaker/options.rb

Instance Method Summary collapse

Instance Method Details

#err_line_prefixObject



31
32
33
# File 'lib/eac_cli/speaker/options.rb', line 31

def err_line_prefix
  option(OPTION_ERR_LINE_PREFIX, '')
end

#err_outObject



14
15
16
# File 'lib/eac_cli/speaker/options.rb', line 14

def err_out
  option(OPTION_ERR_OUT, $stderr)
end

#ignore_caseBoolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/eac_cli/speaker/options.rb', line 27

def ignore_case
  option(OPTION_IGNORE_CASE, nil)
end

#in_inObject



22
23
24
# File 'lib/eac_cli/speaker/options.rb', line 22

def in_in
  option(OPTION_IN_IN, $stdin)
end

#option(key, default) ⇒ Object



39
40
41
# File 'lib/eac_cli/speaker/options.rb', line 39

def option(key, default)
  options[key] || parent.if_present(default) { |v| v.send(__METHOD__) }
end

#out_outObject



18
19
20
# File 'lib/eac_cli/speaker/options.rb', line 18

def out_out
  option(OPTION_OUT_OUT, $stdout)
end

#parentObject



35
36
37
# File 'lib/eac_cli/speaker/options.rb', line 35

def parent
  options[OPTION_PARENT]
end