Class: Protod::Rpc::Response::Receiver::Base
- Defined in:
- lib/protod/rpc/response.rb
Class Method Summary collapse
- .procedure_pushed?(name, singleton: false) ⇒ Boolean
- .push_procedure(*names, singleton: false) ⇒ Object
Class Method Details
.procedure_pushed?(name, singleton: false) ⇒ Boolean
61 62 63 |
# File 'lib/protod/rpc/response.rb', line 61 def self.procedure_pushed?(name, singleton: false) procedures&.include?(Protod::RubyIdent.new(const_name: ruby_ident, method_name: name, singleton: singleton)) || false end |
.push_procedure(*names, singleton: false) ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'lib/protod/rpc/response.rb', line 52 def self.push_procedure(*names, singleton: false) ruby_idents = names.map { Protod::RubyIdent.new(const_name: ruby_ident, method_name: _1, singleton: singleton) } Protod::Rpc::Response.register_for(*ruby_idents.map(&:to_s), with: Protod::Rpc::Response::Base, force: false, ignore: true) self.procedures ||= [] self.procedures.push(*ruby_idents) end |