Exception: MilkTea::ModuleLoadError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/milk_tea/core/module_loader/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, path:, line: nil, column: nil) ⇒ ModuleLoadError

Returns a new instance of ModuleLoadError.



7
8
9
10
11
12
# File 'lib/milk_tea/core/module_loader/errors.rb', line 7

def initialize(message, path:, line: nil, column: nil)
  @path = path
  @line = line
  @column = column
  super("#{message}: #{path}")
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



5
6
7
# File 'lib/milk_tea/core/module_loader/errors.rb', line 5

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



5
6
7
# File 'lib/milk_tea/core/module_loader/errors.rb', line 5

def line
  @line
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/milk_tea/core/module_loader/errors.rb', line 5

def path
  @path
end

Instance Method Details

#codeObject



14
15
16
# File 'lib/milk_tea/core/module_loader/errors.rb', line 14

def code
  "module/error"
end