Exception: MiniRuby::Compiler::Error
- Extended by:
- T::Sig
- Defined in:
- lib/miniruby/compiler.rb
Overview
Wraps a list of compiler errors.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
: Array.
Class Method Summary collapse
-
.[](*errors) ⇒ Object
: (*String errors) -> instance.
Instance Method Summary collapse
-
#==(other) ⇒ Object
: (Object other) -> bool.
-
#initialize(errors) ⇒ Error
constructor
: (Array errors) -> void.
-
#inspect ⇒ Object
: -> String.
Constructor Details
Instance Attribute Details
#errors ⇒ Object (readonly)
: Array
27 28 29 |
# File 'lib/miniruby/compiler.rb', line 27 def errors @errors end |
Class Method Details
.[](*errors) ⇒ Object
: (*String errors) -> instance
21 22 23 |
# File 'lib/miniruby/compiler.rb', line 21 def [](*errors) new(errors) end |
Instance Method Details
#==(other) ⇒ Object
: (Object other) -> bool
36 37 38 39 40 |
# File 'lib/miniruby/compiler.rb', line 36 def ==(other) return false unless other.is_a?(Error) @errors == other.errors end |
#inspect ⇒ Object
: -> String
43 44 45 |
# File 'lib/miniruby/compiler.rb', line 43 def inspect "#{self.class}#{@errors.inspect}" end |