Class: Hackle::HttpWorkspaceFetcher
- Inherits:
-
Object
- Object
- Hackle::HttpWorkspaceFetcher
- Defined in:
- lib/hackle/internal/workspace/http_workspace_fetcher.rb
Instance Method Summary collapse
- #fetch_if_modified ⇒ Hackle::Workspace?
-
#initialize(http_client:, sdk:) ⇒ HttpWorkspaceFetcher
constructor
A new instance of HttpWorkspaceFetcher.
Constructor Details
#initialize(http_client:, sdk:) ⇒ HttpWorkspaceFetcher
Returns a new instance of HttpWorkspaceFetcher.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/hackle/internal/workspace/http_workspace_fetcher.rb', line 11 def initialize(http_client:, sdk:) # @type [String] @url = "/api/v2/workspaces/#{sdk.key}/config" # @type [HttpClient] @http_client = http_client # @type [String, nil] @last_modified = nil end |
Instance Method Details
#fetch_if_modified ⇒ Hackle::Workspace?
24 25 26 27 28 |
# File 'lib/hackle/internal/workspace/http_workspace_fetcher.rb', line 24 def fetch_if_modified request = create_request response = @http_client.execute(request) handle_response(response) end |