Class: Vim::Jar::Importer::Github

Inherits:
Object
  • Object
show all
Defined in:
lib/vim-jar/importer/github.rb

Class Method Summary collapse

Class Method Details

.extract(page_source) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/vim-jar/importer/github.rb', line 5

def self.extract(page_source)  
  infos = {
    "url" => page_source[/<a href=\"(git:\/\/github\.com\/.+?)\".*>/,1],
    "desc" => page_source[/<p>(.+?)\s+<span id=\"read_more\"/,1], 
    "type" => "git"
  } 
end