Class: XxxRename::SiteClients::Base

Inherits:
Object
  • Object
show all
Includes:
Configuration, Utils
Defined in:
lib/xxx_rename/site_clients/base.rb

Constant Summary

Constants included from Utils

Utils::RETRIABLE_ERRORS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configuration

included

Methods included from Utils

#adjust_apostrophe, #api_error, #handle_response!

Constructor Details

#initialize(config) ⇒ Base

Returns a new instance of Base.

Parameters:



16
17
18
19
20
21
22
23
24
# File 'lib/xxx_rename/site_clients/base.rb', line 16

def initialize(config)
  @actors_helper = ActorsHelper.instance
  @config = config
  @source_format = site_config.file_source_format
  return unless self.class.include?(HTTParty)

  self.class.logger(XxxRename.logger, :debug)
  self.class.headers(Constants::DEFAULT_HEADERS)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



13
14
15
# File 'lib/xxx_rename/site_clients/base.rb', line 13

def config
  @config
end

#source_formatObject (readonly)

Returns the value of attribute source_format.



13
14
15
# File 'lib/xxx_rename/site_clients/base.rb', line 13

def source_format
  @source_format
end

Instance Method Details

#search(_filename, **_opts) ⇒ Object



26
27
28
# File 'lib/xxx_rename/site_clients/base.rb', line 26

def search(_filename, **_opts)
  raise "Not Implemented."
end