Sha256: b530b4a3b75a03ed47234b3b8ef94db8ae88bb310179793cd24ee5b6a42cf960
Contents?: true
Size: 635 Bytes
Versions: 1
Compression:
Stored size: 635 Bytes
Contents
# encoding: utf-8 module Nokaya class ADN < Basic attr_reader :author def initialize args, options = {} super(args, options) @type = :adn parsed = self.parse(args[0]) @image_url = [self.get_basic(parsed)] @author = author(parsed) @file_name = [name()] end private def author page page.css('.p-nickname')[0].text end def post_id args /\d+{2}/.match(args[0]) end def name unless @name.nil? "#{@type.to_s}-#{@name}" else "#{@type.to_s}-#{@workers.sanitize(@author)}-#{post_id(args)}.jpg" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nokaya-0.1.2 | lib/nokaya/adn.rb |