Class: Celluloid::Group::Member
- Inherits:
-
Object
- Object
- Celluloid::Group::Member
- Defined in:
- lib/celluloid/group.rb
Overview
A member of the group
Instance Method Summary collapse
-
#initialize(klass, options = {}) ⇒ Member
constructor
A new instance of Member.
- #start ⇒ Object
Constructor Details
#initialize(klass, options = {}) ⇒ Member
Returns a new instance of Member.
74 75 76 77 78 79 80 81 82 |
# File 'lib/celluloid/group.rb', line 74 def initialize(klass, = {}) @klass = klass # Stringify keys :/ = .inject({}) { |h,(k,v)| h[k.to_s] = v; h } @name = ['as'] @args = ['args'] ? Array(['args']) : [] end |
Instance Method Details
#start ⇒ Object
84 85 86 87 |
# File 'lib/celluloid/group.rb', line 84 def start actor = @klass.new_link(*@args) Actor[@name] = actor if @name end |