Changeset 122
- Timestamp:
- 01/18/2007 18:03:11 (22 months ago)
- Files:
-
- 1 modified
-
trunk/examples/tippytippytepee/tepee.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/tippytippytepee/tepee.rb
r121 r122 8 8 module Web 9 9 def self.get(url) 10 data = URI.parse(url).read 10 uri = URI.parse(url) 11 data = nil 12 case uri 13 when URI::HTTP 14 data = uri.read 15 when URI::Generic 16 page = Tepee.get(:Show, url) 17 def page.meta; @env end 18 def page.base_uri; end 19 data = page.body.to_s 20 OpenURI::Meta.init(data, page) 21 end 11 22 case data.content_type 12 23 when "application/x-javascript", "application/x-json", "application/json" … … 14 25 OpenURI::Meta.init(obj, data) 15 26 obj 27 else 28 data 16 29 end 17 30 end
