Class: Bob::Compiler::Message
- Inherits:
-
Object
- Object
- Bob::Compiler::Message
- Defined in:
- lib/bob/compiler/message.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(message, node_or_line_number) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(message, node_or_line_number) ⇒ Message
Returns a new instance of Message.
6 7 8 9 |
# File 'lib/bob/compiler/message.rb', line 6 def initialize(, node_or_line_number) = @line = extract_line_number(node_or_line_number) end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
4 5 6 |
# File 'lib/bob/compiler/message.rb', line 4 def line @line end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/bob/compiler/message.rb', line 4 def end |
Instance Method Details
#<=>(other) ⇒ Object
11 12 13 |
# File 'lib/bob/compiler/message.rb', line 11 def <=>(other) line <=> other.line end |