Class: Salestation::Web::Extractors::InputExtractor

Inherits:
Object
  • Object
show all
Includes:
Deterministic
Defined in:
lib/salestation/web/extractors.rb

Instance Method Summary collapse

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