From dd1edccf215095dac26545d39c7f60d8c852a38a Mon Sep 17 00:00:00 2001
From: man13 <man13@inf.ufpr.br>
Date: Thu, 25 Feb 2016 11:46:48 -0300
Subject: [PATCH] creating url thumbnail generator

Signed-off-by: man13 <man13@inf.ufpr.br>
---
 .../strategies/url_thumbnail_generator.rb     | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 lib/thumbnail/strategies/url_thumbnail_generator.rb

diff --git a/lib/thumbnail/strategies/url_thumbnail_generator.rb b/lib/thumbnail/strategies/url_thumbnail_generator.rb
new file mode 100644
index 00000000..e25b380c
--- /dev/null
+++ b/lib/thumbnail/strategies/url_thumbnail_generator.rb
@@ -0,0 +1,20 @@
+require 'screencap'
+
+module Thumbnail
+  module Strategies
+    class UrlThumbnailGenerator < ::Thumbnail::GeneratableStrategy
+
+      def generate(screen)
+        screen.fetch(
+            width: 1024,
+            height: 768
+        )
+      end
+
+      def can_generate?(screen)
+        ::Screencap::Fetcher == screen.class
+      end
+
+    end
+  end
+end
\ No newline at end of file
-- 
GitLab