Module: Telepathy

Defined in:
lib/telepathy.rb,
lib/telepathy/version.rb

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.bridge(url, xss, scripts) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/telepathy.rb', line 4

def self.bridge(url, xss, scripts)
  ghost_page = Net::HTTP.get_response(URI.parse(url))
  if xss
    scripts.each do | script |
      ghost_page += '<script type="application/javascript" src="#{script}"></script>'
    end
  end
  return ghost_page
end