Sha256: c0f989fbbab3b502fdfd5ecb6645c44d6ad3d99979210dccc30a94b8d930041f
Contents?: true
Size: 420 Bytes
Versions: 4
Compression:
Stored size: 420 Bytes
Contents
# encoding: utf-8 module Nokaya class Image def self.photo_name nokaya unless nokaya.options[:name] Dir.home + "/Downloads/#{nokaya.type.to_s}-#{Time.now.to_i}.jpg" else Dir.home + "/Downloads/#{nokaya.type.to_s}-#{nokaya.options[:name]}.jpg" end end def self.save_image path, content f = File.new(path, "wb") f.puts(content) f.close end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
nokaya-0.0.5 | lib/nokaya/image.rb |
nokaya-0.0.4 | lib/nokaya/image.rb |
nokaya-0.0.3 | lib/nokaya/image.rb |
nokaya-0.0.2 | lib/nokaya/image.rb |