Class: Salestation::Web::Extractors::InputExtractor
- Inherits:
-
Object
- Object
- Salestation::Web::Extractors::InputExtractor
- Includes:
- Deterministic
- Defined in:
- lib/salestation/web/extractors.rb
Instance Method Summary collapse
- #call(rack_request) ⇒ Object
-
#initialize(&block) ⇒ InputExtractor
constructor
A new instance of InputExtractor.
- #merge(other) ⇒ Object
Constructor Details
#initialize(&block) ⇒ InputExtractor
Returns a new instance of InputExtractor.
7 8 9 |
# File 'lib/salestation/web/extractors.rb', line 7 def initialize(&block) @block = block end |
Instance Method Details
#call(rack_request) ⇒ Object
11 12 13 |
# File 'lib/salestation/web/extractors.rb', line 11 def call(rack_request) @block.call(rack_request) end |
#merge(other) ⇒ Object
15 16 17 |
# File 'lib/salestation/web/extractors.rb', line 15 def merge(other) CombinedInputExtractor.new([self, other]) end |