Module: Ffmprb::Util::ProcVis::ClassMethods
- Defined in:
- lib/ffmprb/util/proc_vis.rb
Instance Attribute Summary collapse
-
#proc_vis_firebase ⇒ Object
Returns the value of attribute proc_vis_firebase.
Instance Method Summary collapse
Instance Attribute Details
#proc_vis_firebase ⇒ Object
Returns the value of attribute proc_vis_firebase.
50 51 52 |
# File 'lib/ffmprb/util/proc_vis.rb', line 50 def proc_vis_firebase @proc_vis_firebase end |
Instance Method Details
#proc_vis_edge(from, to, op = :upsert) ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ffmprb/util/proc_vis.rb', line 71 def proc_vis_edge(from, to, op=:upsert) return unless proc_vis_init? if op == :upsert proc_vis_node from proc_vis_node to end "#{from.object_id} -> #{to.object_id}".tap do |edge| proc_vis_sync do @_proc_vis_edges ||= SortedSet.new if op == :remove @_proc_vis_edges.delete edge else @_proc_vis_edges << edge end end proc_vis_update end end |
#proc_vis_node(obj, op = :upsert) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/ffmprb/util/proc_vis.rb', line 52 def proc_vis_node(obj, op=:upsert) return unless proc_vis_init? fail Error, "Must be a #{Node.name}" unless obj.kind_of? Node obj._proc_vis = self obj.proc_vis_name.tap do |lbl| proc_vis_sync do @_proc_vis_nodes ||= {} if op == :remove @_proc_vis_nodes.delete obj else @_proc_vis_nodes[obj] = lbl end end proc_vis_update # TODO optimise end end |