Class: Nanite::Agent
Instance Attribute Summary collapse
-
#init_block ⇒ Object
Returns the value of attribute init_block.
Instance Method Summary collapse
- #load_actors_with_daemon_kit_changes(&block) ⇒ Object (also: #load_actors)
Instance Attribute Details
#init_block ⇒ Object
Returns the value of attribute init_block.
4 5 6 |
# File 'lib/daemon_kit/nanite/agent.rb', line 4 def init_block @init_block end |
Instance Method Details
#load_actors_with_daemon_kit_changes(&block) ⇒ Object Also known as: load_actors
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/daemon_kit/nanite/agent.rb', line 6 def load_actors_with_daemon_kit_changes( &block ) actors = @options[:actors] Dir["#{DaemonKit.root}/lib/actors/*.rb"].each do |actor| next if actors && !actors.include?( File.basename(actor, '.rb') ) Nanite::Log.info( "[setup] loading #{actor}" ) require actor end self.init_block.call( self ) end |