Module: Model::Response
- Extended by:
- ActiveSupport::Concern
- Included in:
- Wechat::Response
- Defined in:
- app/models/wechat/model/response.rb
Instance Method Summary collapse
Instance Method Details
#invoke_effect(request) ⇒ Object
32 33 34 35 36 37 38 |
# File 'app/models/wechat/model/response.rb', line 32 def invoke_effect(request) r = extractors.map(&->(extractor){ extractor.invoke_effect(request) }).compact if reply reply.invoke_effect(request, value: r.join(',')) end end |
#scan_regexp(body) ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/models/wechat/model/response.rb', line 24 def scan_regexp(body) if contain body.match? Regexp.new(match_value) else !body.match?(Regexp.new match_value) end end |