Class: Seafoam::Pass
- Inherits:
-
Object
- Object
- Seafoam::Pass
- Defined in:
- lib/seafoam/passes.rb
Overview
The base class for all passes. You must subclass this to be recognized as an pass.
Direct Known Subclasses
Seafoam::Passes::FallbackPass, Seafoam::Passes::GraalPass, Seafoam::Passes::TrufflePass
Constant Summary collapse
- SUBCLASSES =
[]
Class Method Summary collapse
Instance Method Summary collapse
- #applies?(_graph) ⇒ Boolean
- #apply(_graph) ⇒ Object
-
#initialize(options = {}) ⇒ Pass
constructor
A new instance of Pass.
Constructor Details
#initialize(options = {}) ⇒ Pass
Returns a new instance of Pass.
49 50 51 |
# File 'lib/seafoam/passes.rb', line 49 def initialize( = {}) @options = end |
Class Method Details
.inherited(pass) ⇒ Object
62 63 64 65 |
# File 'lib/seafoam/passes.rb', line 62 def inherited(pass) super SUBCLASSES.push(pass) end |
Instance Method Details
#applies?(_graph) ⇒ Boolean
53 54 55 |
# File 'lib/seafoam/passes.rb', line 53 def applies?(_graph) raise NotImplementedError end |
#apply(_graph) ⇒ Object
57 58 59 |
# File 'lib/seafoam/passes.rb', line 57 def apply(_graph) raise NotImplementedError end |