Sha256: 18874555fa776d6e14229a33d0646b2a885cee4cd2a732ee4c7aa9b500a3553a
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true module Html2rss class RequestService ## # Defines the interface of every request strategy. class Strategy ## # @param ctx [Context] the context for the request def initialize(ctx) @ctx = ctx end ## # Executes the request. # @return [Response] the response from the strategy # @raise [NotImplementedError] if the method is not implemented by the subclass def execute raise NotImplementedError, 'Subclass must implement #execute' end private # @return [Context] the context for the request attr_reader :ctx end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
html2rss-0.16.0 | lib/html2rss/request_service/strategy.rb |