Class: WGPU::CompilationMessage
- Inherits:
-
Data
- Object
- Data
- WGPU::CompilationMessage
- Defined in:
- lib/wgpu/error.rb,
sig/wgpu.rbs
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#line_num ⇒ Object
(also: #line)
readonly
Returns the value of attribute line_num.
-
#line_pos ⇒ Object
(also: #column)
readonly
Returns the value of attribute line_pos.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#to_s ⇒ String
Formats the diagnostic with source location, severity, and message.
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length
68 69 70 |
# File 'lib/wgpu/error.rb', line 68 def length @length end |
#line_num ⇒ Object (readonly) Also known as: line
Returns the value of attribute line_num
68 69 70 |
# File 'lib/wgpu/error.rb', line 68 def line_num @line_num end |
#line_pos ⇒ Object (readonly) Also known as: column
Returns the value of attribute line_pos
68 69 70 |
# File 'lib/wgpu/error.rb', line 68 def line_pos @line_pos end |
#message ⇒ Object (readonly)
Returns the value of attribute message
68 69 70 |
# File 'lib/wgpu/error.rb', line 68 def @message end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset
68 69 70 |
# File 'lib/wgpu/error.rb', line 68 def offset @offset end |
#type ⇒ Object (readonly)
Returns the value of attribute type
68 69 70 |
# File 'lib/wgpu/error.rb', line 68 def type @type end |
Instance Method Details
#to_s ⇒ String
Formats the diagnostic with source location, severity, and message.
81 82 83 84 |
# File 'lib/wgpu/error.rb', line 81 def to_s location = line_num&.positive? ? "#{line_num}:#{line_pos}" : "unknown location" "#{location}: #{type}: #{}" end |