Class: Rails::Tc::TypeCheckerError
- Inherits:
-
Object
- Object
- Rails::Tc::TypeCheckerError
- Defined in:
- lib/rails/tc/type_checker_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#notes ⇒ Object
readonly
Returns the value of attribute notes.
Instance Method Summary collapse
-
#initialize(filename, line, code, message) ⇒ TypeCheckerError
constructor
A new instance of TypeCheckerError.
- #to_s ⇒ Object
Constructor Details
#initialize(filename, line, code, message) ⇒ TypeCheckerError
Returns a new instance of TypeCheckerError.
8 9 10 11 12 13 14 |
# File 'lib/rails/tc/type_checker_error.rb', line 8 def initialize(filename, line, code, ) @filename = filename @line = line @code = code @message = @notes = [] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/rails/tc/type_checker_error.rb', line 6 def code @code end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
6 7 8 |
# File 'lib/rails/tc/type_checker_error.rb', line 6 def filename @filename end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/rails/tc/type_checker_error.rb', line 6 def line @line end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/rails/tc/type_checker_error.rb', line 6 def @message end |
#notes ⇒ Object (readonly)
Returns the value of attribute notes.
6 7 8 |
# File 'lib/rails/tc/type_checker_error.rb', line 6 def notes @notes end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/rails/tc/type_checker_error.rb', line 16 def to_s "#{filename}:#{line}: #{} https://srb.help/#{code}\n#{notes.join("\n")}" end |