Class: PSGC::Import::Base

Inherits:
Struct
  • Object
show all
Defined in:
lib/psgc/import.rb

Overview

Base class for all other importers

Constant Summary collapse

WEB_FOLDER =
File.expand_path(File.join(%w(.. .. .. web)), __FILE__)

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.dirObject

Returns the value of attribute dir.



14
15
16
# File 'lib/psgc/import.rb', line 14

def dir
  @dir
end

.uriObject

Returns the value of attribute uri.



15
16
17
# File 'lib/psgc/import.rb', line 15

def uri
  @uri
end

Instance Attribute Details

#srcObject

Returns the value of attribute src

Returns:

  • (Object)

    the current value of src



7
8
9
# File 'lib/psgc/import.rb', line 7

def src
  @src
end

Instance Method Details

#fetchObject

Use ‘curl` to get the desired page



22
23
24
25
# File 'lib/psgc/import.rb', line 22

def fetch
  DownloadManager.fetch(src, target)
  parse
end

#parseObject

noop



28
29
# File 'lib/psgc/import.rb', line 28

def parse
end