Module: Raw
- Included in:
- Curation::Page
- Defined in:
- lib/curation/tools/raw.rb
Instance Method Summary collapse
Instance Method Details
#file ⇒ Object
3 4 5 6 7 |
# File 'lib/curation/tools/raw.rb', line 3 def file @file ||= URI.open url, 'User-Agent' => "Mozilla/5.0" rescue log "Curation::Page file error with url #{url}" end |
#html ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/curation/tools/raw.rb', line 9 def html unless @html file.rewind @html = file.read file.rewind end @html rescue log "Curation::Page html error" end |