Class: Reacto::LabeledTrackable
- Defined in:
- lib/reacto/labeled_trackable.rb
Constant Summary
Constants inherited from Trackable
Trackable::EXECUTOR_ALIASES, Trackable::TOPICS
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(label, executor = nil, &block) ⇒ LabeledTrackable
constructor
A new instance of LabeledTrackable.
- #relabel ⇒ Object
Methods inherited from Trackable
#[], #act, #all?, #any?, #append, #await, #buffer, #chunk, #chunk_while, close, #combine, combine, combine_last, #combine_last, combine_latest, concat, #concat, #count, #cycle, #delay, #delay_each, #depend_on, #diff, #do_track, #drop, #drop_errors, #drop_while, #each_cons, #each_slice, #each_with_index, #each_with_object, #entries, enumerable, error, #execute_on, #find, #find_index, #first, #flat_map, #flat_map_latest, #flatten, #flatten_labeled, #grep, #grep_v, #group_by_label, #include?, #inject, interval, #last, later, #lazy, #lift, make, #map, #max, #max_by, #merge, #min, #min_by, #minmax, #minmax_by, never, #none?, #off, #on, #one?, #partition, #prepend, #reject, repeat, #rescue_and_replace_error, #rescue_and_replace_error_with, #retry, #retry_when, #select, #slice, #slice_after, #slice_before, #slice_when, #sort, #sort_by, #split_labeled, #take, #take_while, #throttle, #to_a, #to_h, #track, #track_on, #uniq, value, #wrap, zip, #zip
Constructor Details
#initialize(label, executor = nil, &block) ⇒ LabeledTrackable
Returns a new instance of LabeledTrackable.
7 8 9 10 11 |
# File 'lib/reacto/labeled_trackable.rb', line 7 def initialize(label, executor = nil, &block) super(executor, &block) @label = label end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/reacto/labeled_trackable.rb', line 5 def label @label end |
Instance Method Details
#relabel ⇒ Object
13 14 15 16 17 |
# File 'lib/reacto/labeled_trackable.rb', line 13 def relabel new_label = yield label self.class.new(new_label, @executor, &@behaviour) end |