Exception: RspecN::BadOption
- Inherits:
-
StandardError
- Object
- StandardError
- RspecN::BadOption
- Defined in:
- lib/rspec_n/errors/bad_option.rb
Instance Method Summary collapse
-
#initialize(msg = "") ⇒ BadOption
constructor
A new instance of BadOption.
- #message ⇒ Object
Constructor Details
#initialize(msg = "") ⇒ BadOption
Returns a new instance of BadOption.
3 4 5 6 |
# File 'lib/rspec_n/errors/bad_option.rb', line 3 def initialize(msg="") @details = msg super end |
Instance Method Details
#message ⇒ Object
8 9 10 11 |
# File 'lib/rspec_n/errors/bad_option.rb', line 8 def allowed = RspecN::ALLOWED_ORDER_OPTIONS.collect { |val| "'#{val}'" } "Order must be #{allowed.to_sentence}. '#{@details}' is not allowed.\n" end |