Class: Ruboty::Handlers::Zoi
- Inherits:
-
Base
- Object
- Base
- Ruboty::Handlers::Zoi
- Defined in:
- lib/ruboty/zoi.rb
Constant Summary collapse
- ZOI_DATA_URI =
"http://zoi.herokuapp.com/js/services.js"
Instance Method Summary collapse
Instance Method Details
#zoi(message) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/ruboty/zoi.rb', line 17 def zoi() keyword = .match_data[1] if keyword == "list" .reply(fetch_data.map {|z| z["word"] }.uniq.sort.join(", ")) else .reply(find_zoi_by_keyword(keyword)["image"]) end end |