class Parlour::Conversion::Converter
An abstract class which converts between the node trees of two type systems.
Attributes
warnings[R]
Public Class Methods
new()
click to toggle source
# File lib/parlour/conversion/converter.rb, line 13 def initialize @warnings = [] end
Public Instance Methods
add_warning(msg, node)
click to toggle source
# File lib/parlour/conversion/converter.rb, line 21 def add_warning(msg, node) warnings << [msg, node] return if $VERBOSE.nil? class_name = T.must(self.class.name).split('::').last print Rainbow("Parlour warning: ").yellow.dark.bold print Rainbow("#{class_name}: ").magenta.bright.bold puts msg print Rainbow(" └ at object: ").blue.bright.bold puts node.describe end