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



74
75
76
77
# File 'lib/uniword/errors.rb', line 74

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



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

def operation
  @operation
end