Class: Unparser::Validation::Literal

Inherits:
Unparser::Validation show all
Defined in:
lib/unparser/validation.rb

Instance Method Summary collapse

Methods inherited from Unparser::Validation

from_node, from_path, from_string

Instance Method Details

#reportObject



143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/unparser/validation.rb', line 143

def report
  message = [identification]

  message.concat(make_report('Original-Source',  :original_source))
  message.concat(make_report('Generated-Source', :generated_source))
  message.concat(make_report('Original-Node',    :original_node))
  message.concat(make_report('Generated-Node',   :generated_node))
  message.concat(node_diff_report)
  message.concat(source_diff_report)

  message.join("\n")
end

#success?Boolean

Returns:

  • (Boolean)


139
140
141
# File 'lib/unparser/validation.rb', line 139

def success?
  original_source.eql?(generated_source)
end