Sha256: 4ebe5ca9c9908fce38e1d1ffe93069e2380307eb9ae805a7e29be2392337685e

Contents?: true

Size: 466 Bytes

Versions: 4

Compression:

Stored size: 466 Bytes

Contents

# encoding: utf-8
module Nokaya
  class Tumblr < Basic

    def initialize args, options = {}
      super(args, options)
      @type = :tumblr
      parsed = parse(args[0])
      @urls = [get_basic(parsed)] unless parsed.nil?
      @filenames = [name_files()]
    end

    private

    def name_files
      @name ||= base()
      "#{@type.to_s}-#{@name}"
    end

    def base
      File.basename(@urls[0]).gsub('tumblr_', '') unless @urls.empty?
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nokaya-0.1.6 lib/nokaya/tumblr.rb
nokaya-0.1.5 lib/nokaya/tumblr.rb
nokaya-0.1.4 lib/nokaya/tumblr.rb
nokaya-0.1.3 lib/nokaya/tumblr.rb