Class: Umbra::Encoder
- Inherits:
-
Object
- Object
- Umbra::Encoder
- Defined in:
- lib/umbra/encoder.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
- #ignored_headers ⇒ Object
-
#initialize(env) ⇒ Encoder
constructor
A new instance of Encoder.
Constructor Details
#initialize(env) ⇒ Encoder
Returns a new instance of Encoder.
9 10 11 |
# File 'lib/umbra/encoder.rb', line 9 def initialize(env) @env = env end |
Class Method Details
.call(env) ⇒ Object
5 6 7 |
# File 'lib/umbra/encoder.rb', line 5 def self.call(env) new(env).call end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/umbra/encoder.rb', line 13 def call @call ||= Pb::Message.new( method: rack_request.request_method, url: rack_request.url, body: request_body, headers: request_headers ).to_proto end |
#ignored_headers ⇒ Object
22 23 24 |
# File 'lib/umbra/encoder.rb', line 22 def ignored_headers [] end |