Sha256: 08c54266e6afab32aac5445bfc652a9b701c42e44c08c28a5d65f9b5b7d0a60f

Contents?: true

Size: 379 Bytes

Versions: 11

Compression:

Stored size: 379 Bytes

Contents

module AWS
  module S3
    class S3Object
      
      def name
        self.key
      end

      def to_class_name
        self.key.gsub('.csv','').capitalize
      end

      def save_to(path)
        File.open(path,'w') do |file|
          S3Object.stream(self.key,self.bucket.name) do |chunk|
            file.write chunk
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
redis_importer-0.1.0 lib/extensions/s3.rb
redis_importer-0.0.10 lib/extensions/s3.rb
redis_importer-0.0.9 lib/extensions/s3.rb
redis_importer-0.0.8 lib/extensions/s3.rb
redis_importer-0.0.7 lib/extensions/s3.rb
redis_importer-0.0.6 lib/extensions/s3.rb
redis_importer-0.0.5 lib/extensions/s3.rb
redis_importer-0.0.4 lib/extensions/s3.rb
redis_importer-0.0.3 lib/extensions/s3.rb
redis_importer-0.0.2 lib/extensions/s3.rb
redis_importer-0.0.1 lib/extensions/s3.rb