Class: Nanite::Agent

Inherits:
Object show all
Defined in:
lib/daemon_kit/nanite/agent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#init_blockObject

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