Class: UndriveGoogle::Transformation

Inherits:
Struct
  • Object
show all
Defined in:
lib/undrive_google/transformation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delete_zipObject

Returns the value of attribute delete_zip

Returns:

  • (Object)

    the current value of delete_zip



4
5
6
# File 'lib/undrive_google/transformation.rb', line 4

def delete_zip
  @delete_zip
end

#downloadObject

Returns the value of attribute download

Returns:

  • (Object)

    the current value of download



4
5
6
# File 'lib/undrive_google/transformation.rb', line 4

def download
  @download
end

#fix_htmlObject

Returns the value of attribute fix_html

Returns:

  • (Object)

    the current value of fix_html



4
5
6
# File 'lib/undrive_google/transformation.rb', line 4

def fix_html
  @fix_html
end

#rename_htmlObject

Returns the value of attribute rename_html

Returns:

  • (Object)

    the current value of rename_html



4
5
6
# File 'lib/undrive_google/transformation.rb', line 4

def rename_html
  @rename_html
end

#unzipObject

Returns the value of attribute unzip

Returns:

  • (Object)

    the current value of unzip



4
5
6
# File 'lib/undrive_google/transformation.rb', line 4

def unzip
  @unzip
end

Instance Method Details

#each {|download| ... } ⇒ Object

Yields:



14
15
16
17
18
19
20
21
# File 'lib/undrive_google/transformation.rb', line 14

def each
  yield download unless download.nil?
  yield unzip unless unzip.nil?
  yield fix_html unless fix_html.nil?
  # Rename after fix to prevent confusion about the current path of the file
  yield rename_html unless rename_html.nil?
  yield delete_zip unless delete_zip.nil?
end

#liberate!Object



10
11
12
# File 'lib/undrive_google/transformation.rb', line 10

def liberate!
  each(&:process)
end