class Nokaya::ImgurAlbum
Attributes
Public Class Methods
new(args, options = {})
click to toggle source
Calls superclass method
Nokaya::Basic::new
# File lib/nokaya/imgur_album.rb, line 8 def initialize args, options = {} super(args, options) @type = :imgur parsed = parse(args[0]) @author = author_name(parsed) @urls = album(parsed) @path = "#{@path}/imgur-#{@author}-#{@workers.timed}" @filenames = name_files() end
Private Instance Methods
album(page)
click to toggle source
# File lib/nokaya/imgur_album.rb, line 20 def album page return [] if page.nil? refs = page.css('#imagelist .posts .post a') refs.map {|l| "http:#{l['href']}"} end