Class: Texd::Configuration::InvalidConfig
- Defined in:
- lib/texd/config.rb
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#option ⇒ Object
readonly
Returns the value of attribute option.
Instance Method Summary collapse
-
#initialize(msg, option:, got:, expected: nil) ⇒ InvalidConfig
constructor
A new instance of InvalidConfig.
Constructor Details
#initialize(msg, option:, got:, expected: nil) ⇒ InvalidConfig
Returns a new instance of InvalidConfig.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/texd/config.rb', line 11 def initialize(msg, option:, got:, expected: nil) @option = option @expected = expected = [format("Invalid configuration option for %p, got %p", option, got)] << msg if msg << format("Valid options are: %p", expected) if expected super .join(" ") end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
9 10 11 |
# File 'lib/texd/config.rb', line 9 def expected @expected end |
#option ⇒ Object (readonly)
Returns the value of attribute option.
9 10 11 |
# File 'lib/texd/config.rb', line 9 def option @option end |