class FileGrabber::DocumentPage

Attributes

filename[R]

Public Class Methods

new(link) click to toggle source
# File lib/filegrabber/document_page.rb, line 9
def initialize link
  @filename = link.inner_text
  @url = link['href']
end

Public Instance Methods

Private Instance Methods

download_anchor(selector) click to toggle source
# File lib/filegrabber/document_page.rb, line 20
def download_anchor selector
  Nokogiri::HTML(FileGrabber::URL.new(@url).get_body)
    .css(selector)
    .first
end