Sha256: 2d45aeaecb9270a7e5744e2dc199a8a1f938b000d2019fdc1c769ceedde7d98f

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

module Ellen
  module Handlers
    class GoogleImage < Base
      on /image (.+)/, description: "Search image from Google" do |message|
        if url = Ellen::GoogleImage::Client.new(query: message[1]).get
          say url
        end
      end

      on /animate (.+)/, description: "Search animation from Google" do |message|
        if url = Ellen::GoogleImage::Client.new(query: message[1]).get
          say url
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ellen-google_image-0.0.1 lib/ellen/handlers/google_image.rb