Module: EacCli::Speaker::Options

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

Instance Method Summary collapse

Instance Method Details

#err_line_prefixObject



29
30
31
# File 'lib/eac_cli/speaker/options.rb', line 29

def err_line_prefix
  option(OPTION_ERR_LINE_PREFIX, '')
end

#err_outObject



12
13
14
# File 'lib/eac_cli/speaker/options.rb', line 12

def err_out
  option(OPTION_ERR_OUT, $stderr)
end

#ignore_caseBoolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/eac_cli/speaker/options.rb', line 25

def ignore_case
  option(OPTION_IGNORE_CASE, nil)
end

#in_inObject



20
21
22
# File 'lib/eac_cli/speaker/options.rb', line 20

def in_in
  option(OPTION_IN_IN, $stdin)
end

#option(key, default) ⇒ Object



37
38
39
# File 'lib/eac_cli/speaker/options.rb', line 37

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

#out_outObject



16
17
18
# File 'lib/eac_cli/speaker/options.rb', line 16

def out_out
  option(OPTION_OUT_OUT, $stdout)
end

#parentObject



33
34
35
# File 'lib/eac_cli/speaker/options.rb', line 33

def parent
  options[OPTION_PARENT]
end