Class: Textus::Workflow::Collector
- Inherits:
-
Object
- Object
- Textus::Workflow::Collector
- Defined in:
- lib/textus/workflow/collector.rb
Class Attribute Summary collapse
-
.current ⇒ Object
readonly
Returns the value of attribute current.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(registry) ⇒ Collector
constructor
A new instance of Collector.
- #register(defn) ⇒ Object
Constructor Details
#initialize(registry) ⇒ Collector
Returns a new instance of Collector.
18 19 20 |
# File 'lib/textus/workflow/collector.rb', line 18 def initialize(registry) @registry = registry end |
Class Attribute Details
.current ⇒ Object (readonly)
Returns the value of attribute current.
7 8 9 |
# File 'lib/textus/workflow/collector.rb', line 7 def current @current end |
Class Method Details
.with(collector) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/textus/workflow/collector.rb', line 10 def self.with(collector) prev = @current @current = collector yield ensure @current = prev end |
Instance Method Details
#register(defn) ⇒ Object
22 23 24 |
# File 'lib/textus/workflow/collector.rb', line 22 def register(defn) @registry.register(defn) end |