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.
104 105 106 107 108 109 110 |
# File 'lib/uniword/errors.rb', line 104 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.
116 117 118 |
# File 'lib/uniword/errors.rb', line 116 def context @context end |
#operation ⇒ String (readonly)
Returns The operation.
113 114 115 |
# File 'lib/uniword/errors.rb', line 113 def operation @operation end |