Class: Docks::Process
- Inherits:
-
Object
- Object
- Docks::Process
- Defined in:
- lib/docks/process.rb
Constant Summary collapse
- @@pattern_processors =
{ early: [], middle: [], late: [] }
- @@pattern_library_processors =
{ early: [], middle: [], late: [] }
Class Method Summary collapse
- .process(item) ⇒ Object
- .register_pattern_library_processor(hook = :middle, &block) ⇒ Object
- .register_pattern_processor(hook = :middle, &block) ⇒ Object
Class Method Details
.process(item) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/docks/process.rb', line 6 def self.process(item) case item when Containers::Symbol then item = process_symbol(item) when Containers::Pattern then process_pattern(item) when Containers::PatternLibrary then process_pattern_library(item) end item end |
.register_pattern_library_processor(hook = :middle, &block) ⇒ Object
20 21 22 |
# File 'lib/docks/process.rb', line 20 def self.register_pattern_library_processor(hook = :middle, &block) @@pattern_library_processors[hook] << block unless @@pattern_library_processors[hook].include?(block) end |
.register_pattern_processor(hook = :middle, &block) ⇒ Object
16 17 18 |
# File 'lib/docks/process.rb', line 16 def self.register_pattern_processor(hook = :middle, &block) @@pattern_processors[hook] << block unless @@pattern_processors[hook].include?(block) end |