Class: Synvert::Core::Rewriter::Warning
- Inherits:
-
Object
- Object
- Synvert::Core::Rewriter::Warning
- Defined in:
- lib/synvert/core/rewriter/warning.rb
Overview
Warning is used to save warning message.
Instance Method Summary collapse
-
#initialize(instance, message) ⇒ Warning
constructor
Initialize a warning.
-
#message ⇒ String
Warning message.
Constructor Details
#initialize(instance, message) ⇒ Warning
Initialize a warning.
10 11 12 13 14 |
# File 'lib/synvert/core/rewriter/warning.rb', line 10 def initialize(instance, ) @file_path = instance.current_file @line = instance.current_node.loc.expression.line @message = end |
Instance Method Details
#message ⇒ String
Warning message.
19 20 21 |
# File 'lib/synvert/core/rewriter/warning.rb', line 19 def "#{@file_path}##{@line}: #{@message}" end |