Class: DuoRuby::Group::Selection
- Inherits:
-
Object
- Object
- DuoRuby::Group::Selection
- Defined in:
- lib/duoruby/group.rb
Instance Method Summary collapse
- #channel(name) ⇒ Object
-
#initialize(members) ⇒ Selection
constructor
A new instance of Selection.
- #send(event, **params) ⇒ Object
Constructor Details
#initialize(members) ⇒ Selection
Returns a new instance of Selection.
20 21 22 |
# File 'lib/duoruby/group.rb', line 20 def initialize(members) @members = members end |
Instance Method Details
#channel(name) ⇒ Object
31 32 33 |
# File 'lib/duoruby/group.rb', line 31 def channel(name) Channel::Namespace.new(self, name) end |
#send(event, **params) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/duoruby/group.rb', line 24 def send(event, **params) replies = @members.map { |client| client.send(event, **params) } return replies if question_event?(event) self end |