Class: CommandHandler
- Inherits:
-
Object
- Object
- CommandHandler
- Defined in:
- lib/command_handler.rb
Instance Method Summary collapse
Instance Method Details
#handle(type, payload) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/command_handler.rb', line 4 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 |