Exception: Uniword::UnsupportedOperationError
- Defined in:
- lib/uniword/errors.rb
Overview
Raised when an unsupported operation is attempted
Instance Attribute Summary collapse
-
#context ⇒ String?
readonly
The context.
-
#operation ⇒ String
readonly
The operation.
Instance Method Summary collapse
-
#initialize(operation, context = nil) ⇒ UnsupportedOperationError
constructor
A new instance of UnsupportedOperationError.
Constructor Details
#initialize(operation, context = nil) ⇒ UnsupportedOperationError
Returns a new instance of UnsupportedOperationError.
111 112 113 114 115 116 117 |
# File 'lib/uniword/errors.rb', line 111 def initialize(operation, context = nil) = "Unsupported operation: #{operation}" += " (#{context})" if context super() @operation = operation @context = context end |
Instance Attribute Details
#context ⇒ String? (readonly)
Returns The context.
123 124 125 |
# File 'lib/uniword/errors.rb', line 123 def context @context end |
#operation ⇒ String (readonly)
Returns The operation.
120 121 122 |
# File 'lib/uniword/errors.rb', line 120 def operation @operation end |