Exception: Uniword::ReadOnlyError

Inherits:
Error
  • Object
show all
Defined in:
lib/uniword/errors.rb

Overview

Raised when trying to write to a read-only document

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation) ⇒ ReadOnlyError

Returns a new instance of ReadOnlyError.

Parameters:

  • operation (String)

    The operation that was attempted



81
82
83
84
# File 'lib/uniword/errors.rb', line 81

def initialize(operation)
  super("Cannot perform '#{operation}' on read-only document")
  @operation = operation
end

Instance Attribute Details

#operationString (readonly)

Returns The operation.

Returns:

  • (String)

    The operation



87
88
89
# File 'lib/uniword/errors.rb', line 87

def operation
  @operation
end