Skip to content

Commit

Permalink
Helper extension that enables injecting remote resources into the gen…
Browse files Browse the repository at this point in the history
…erated site.
  • Loading branch information
unibrew committed Mar 26, 2012
1 parent 1be9b6e commit a82cece
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/awestruct/extensions/remotePartial.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require 'open-uri'

module Awestruct
module Extensions
module RemotePartial

def remotePartial(url)

page = open(url)
return nil if !page
page.read

end

end
end
end

0 comments on commit a82cece

Please sign in to comment.