Class: TwirpHandler
- Inherits:
-
Object
- Object
- TwirpHandler
- Defined in:
- lib/rails_respond_to_pb/twirp_handler.rb
Instance Method Summary collapse
-
#initialize(controller:) ⇒ TwirpHandler
constructor
class UnknownRpcError < StandardError; end.
- #method_missing(method_name, *arguments, &_block) ⇒ Object
- #respond_to_missing?(method_name, _include_private = false) ⇒ Boolean
Constructor Details
#initialize(controller:) ⇒ TwirpHandler
class UnknownRpcError < StandardError; end
6 7 8 |
# File 'lib/rails_respond_to_pb/twirp_handler.rb', line 6 def initialize(controller:) @controller = controller end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *arguments, &_block) ⇒ Object
21 22 23 |
# File 'lib/rails_respond_to_pb/twirp_handler.rb', line 21 def method_missing(method_name, *arguments, &_block) dispatch method_name, arguments[0], arguments[1] end |
Instance Method Details
#respond_to_missing?(method_name, _include_private = false) ⇒ Boolean
25 26 27 |
# File 'lib/rails_respond_to_pb/twirp_handler.rb', line 25 def respond_to_missing?(method_name, _include_private = false) @controller.method_defined? method_name end |