Class: Andromeda::Plan

Inherits:
Impl::ProtoPlan show all
Defined in:
lib/andromeda/plan.rb,
lib/andromeda/sugar.rb

Instance Attribute Summary collapse

Attributes inherited from Impl::ProtoPlan

#guide, #id

Instance Method Summary collapse

Methods inherited from Impl::ProtoPlan

#>>, #current_name, #current_scope, #data_key, #data_tag, #data_val, #dest, #entry, #init_guide, #key_label, #key_spot, #map_data, #mute, name_spot, #post_data, #post_to, #public_spot, #selects?, #signal_name?, signal_names, #signal_names, signal_spot, spot_attr, #spot_attr_name?, spot_attr_names, #spot_attr_names, spot_meth, #spot_meth_name?, #spot_meth_names, spot_meth_names, #spot_name?, #spot_names, spot_names, #tags, #via

Methods included from Impl::To_S

short_s, #to_s

Methods inherited from Impl::ConnectorBase

#post, #post_local, #start

Constructor Details

#initialize(config = {}) ⇒ Plan

Returns a new instance of Plan.



20
21
22
23
24
25
# File 'lib/andromeda/plan.rb', line 20

def initialize(config = {})
  super config
  @trace_enter ||= init_trace_hash :enter
  @trace_exit  ||= init_trace_hash :emit
  @error_level ||= :error
end

Instance Attribute Details

#error_levelObject

Returns the value of attribute error_level.



14
15
16
# File 'lib/andromeda/plan.rb', line 14

def error_level
  @error_level
end

#logObject

Returns the value of attribute log.



10
11
12
# File 'lib/andromeda/plan.rb', line 10

def log
  @log
end

#markerObject

Returns the value of attribute marker.



11
12
13
# File 'lib/andromeda/plan.rb', line 11

def marker
  @marker
end

#nickObject

Returns the value of attribute nick.



12
13
14
# File 'lib/andromeda/plan.rb', line 12

def nick
  @nick
end

#trace_enterObject

Returns the value of attribute trace_enter.



16
17
18
# File 'lib/andromeda/plan.rb', line 16

def trace_enter
  @trace_enter
end

#trace_exitObject

Returns the value of attribute trace_exit.



17
18
19
# File 'lib/andromeda/plan.rb', line 17

def trace_exit
  @trace_exit
end

Instance Method Details

#initialize_copy(other) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/andromeda/plan.rb', line 27

def initialize_copy(other)
  super other
  @trace_enter = other.trace_enter.identical_copy
  @trace_exit  = other.trace_exit.identical_copy
  @error_level = other.error_level.identical_copy
  @nick        = other.nick.identical_copy
end

#on_enter(key, val) ⇒ Object



40
41
42
43
# File 'lib/andromeda/plan.rb', line 40

def on_enter(key, val)
  exit_ = exit
  exit_ << val if exit_
end

#poolObject



4
# File 'lib/andromeda/sugar.rb', line 4

def pool ; guide.pool_track.pool rescue nil end

#tap {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



35
# File 'lib/andromeda/plan.rb', line 35

def tap ; yield self end

#to_short_sObject



45
46
47
48
49
50
51
# File 'lib/andromeda/plan.rb', line 45

def to_short_s
  super_ = super()
  nick_  = nick
  if nick_
    then "#{super_} aka: #{Impl::To_S.short_s(nick_)}"
    else super_ end
end