Class: Twirp::Rails::Handler
- Inherits:
-
Object
- Object
- Twirp::Rails::Handler
- Includes:
- ActiveSupport::Rescuable, Callbacks
- Defined in:
- lib/twirp/rails/handler.rb
Instance Attribute Summary collapse
-
#action_name ⇒ Object
readonly
Returns the value of attribute action_name.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#error ⇒ Object
Returns the value of attribute error.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
Instance Attribute Details
#action_name ⇒ Object (readonly)
Returns the value of attribute action_name.
11 12 13 |
# File 'lib/twirp/rails/handler.rb', line 11 def action_name @action_name end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
10 11 12 |
# File 'lib/twirp/rails/handler.rb', line 10 def env @env end |
#error ⇒ Object
Returns the value of attribute error.
12 13 14 |
# File 'lib/twirp/rails/handler.rb', line 12 def error @error end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
10 11 12 |
# File 'lib/twirp/rails/handler.rb', line 10 def request @request end |
Instance Method Details
#process(name, request, env) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/twirp/rails/handler.rb', line 17 def process(name, request, env) @request = request @env = env @error = nil @action_name = name.to_s response = process_action(action_name) error || response end |