Class: Unparser::CLI::Source::Generated
- Inherits:
-
Object
- Object
- Unparser::CLI::Source::Generated
- Defined in:
- lib/unparser/cli/source.rb
Overview
Source state generated after first unparse
Class Method Summary collapse
-
.build(ast) ⇒ Object
private
Build generateg source.
Instance Method Summary collapse
-
#success? ⇒ Boolean
private
Test if source was generated successfully.
Class Method Details
.build(ast) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build generateg source
29 30 31 32 33 34 |
# File 'lib/unparser/cli/source.rb', line 29 def self.build(ast) source = Unparser.unparse(ast) new(source, ast, nil) rescue => exception new(nil, ast, exception) end |
Instance Method Details
#success? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if source was generated successfully
19 20 21 |
# File 'lib/unparser/cli/source.rb', line 19 def success? !error end |