Class: InitialCaseError
- Inherits:
-
CompilerError
- Object
- CompilerError
- InitialCaseError
- Defined in:
- lib/compiler_error.rb
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(type, initial_case, ast) ⇒ InitialCaseError
constructor
A new instance of InitialCaseError.
Methods inherited from CompilerError
Constructor Details
#initialize(type, initial_case, ast) ⇒ InitialCaseError
Returns a new instance of InitialCaseError.
14 15 16 17 18 19 |
# File 'lib/compiler_error.rb', line 14 def initialize type, initial_case, ast super ast.position @type = type @initial_case = initial_case @ast = ast end |
Instance Method Details
#info ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/compiler_error.rb', line 21 def info if @type == 'node_nick' then return "'#{@ast.nickname}' : nickname of nodes should be #{@initial_case} case" else return "'#{@ast.name}' : name of #{@type}s should be #{@initial_case} case" end end |