Exception: Cyc::UnbalancedOpeningParenthesis

Inherits:
CycError
  • Object
show all
Defined in:
lib/cyc/exception.rb

Overview

Error raised if the message sent to the server has more opening parentheses than closing parentheses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count) ⇒ UnbalancedOpeningParenthesis

Initialize the exception with the count of unbalanced opening parentheses.



17
18
19
20
# File 'lib/cyc/exception.rb', line 17

def initialize(count)
  super("There are #{count} unbalanced opening parentheses")
  @count = count
end

Instance Attribute Details

#countObject (readonly)

The number of unbalanced opening parentheses.



13
14
15
# File 'lib/cyc/exception.rb', line 13

def count
  @count
end