Class: E621ExportDownloader::ExportHelper

Inherits:
Object
  • Object
show all
Extended by:
T::Generic, T::Sig
Defined in:
lib/e621_export_downloader/export_helper.rb

Constant Summary collapse

Model =
type_member

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, client:) ⇒ ExportHelper

Returns a new instance of ExportHelper.



18
19
20
21
22
# File 'lib/e621_export_downloader/export_helper.rb', line 18

def initialize(type:, client:)
  @type = type
  @client = client
  @_get = T.let(nil, T.nilable(Export[Model]))
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



15
16
17
# File 'lib/e621_export_downloader/export_helper.rb', line 15

def client
  @client
end

#typeObject (readonly)

Returns the value of attribute type.



12
13
14
# File 'lib/e621_export_downloader/export_helper.rb', line 12

def type
  @type
end

Instance Method Details

#deleteObject



25
26
27
# File 'lib/e621_export_downloader/export_helper.rb', line 25

def delete
  _get.delete
end

#downloadObject



30
31
32
# File 'lib/e621_export_downloader/export_helper.rb', line 30

def download
  _get.download
end

#exists?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/e621_export_downloader/export_helper.rb', line 35

def exists?
  _get.exists?
end

#getObject



40
41
42
# File 'lib/e621_export_downloader/export_helper.rb', line 40

def get
  _get
end

#read(&block) ⇒ Object



45
46
47
# File 'lib/e621_export_downloader/export_helper.rb', line 45

def read(&block)
  _get.read(&block)
end

#read_allObject



50
51
52
# File 'lib/e621_export_downloader/export_helper.rb', line 50

def read_all
  _get.read_all
end