class Ocawari::Strategy::Line

Constants

CSS_SELECTOR_HIERARCHY

Private Instance Methods

parse() click to toggle source
# File lib/ocawari/strategy/line.rb, line 13
def parse
  image_nodes = page.css(CSS_SELECTOR_HIERARCHY)

  image_nodes.map do |img|
    imgname = img["src"]

    case imgname
    when /-s\./
      imgname.sub("-s.", ".")
    when /\/small$/
      imgname.sub("/small", "")
    else
      imgname
    end
  end
end