Sha256: 397f2ebe375b350278c628fcf88ada79610946ae29b27f8e70c723d2bb9a89f0

Contents?: true

Size: 231 Bytes

Versions: 9

Compression:

Stored size: 231 Bytes

Contents

require 'net/http'

class CommandHandler
  def handle(type, payload)
    case type
    when :FetchData
      uri = URI('https://www.onet.pl/')
      [:DataFetched, data: Net::HTTP.get(uri).force_encoding("UTF-8")]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
beryl-0.3.1 lib/command_handler.rb
beryl-0.3.0 lib/command_handler.rb
beryl-0.2.5 lib/command_handler.rb
beryl-0.2.4 lib/command_handler.rb
beryl-0.2.3 lib/command_handler.rb
beryl-0.2.2 lib/command_handler.rb
beryl-0.2.1 lib/command_handler.rb
beryl-0.2.0 lib/command_handler.rb
beryl-0.1.0 lib/command_handler.rb