Class: FuncBot::Functions::WeatherFunction
- Inherits:
-
BaseFunction
- Object
- BaseFunction
- FuncBot::Functions::WeatherFunction
- Defined in:
- lib/generators/func_bot/templates/weather_function.rb
Instance Attribute Summary
Attributes inherited from BaseFunction
Instance Method Summary collapse
Methods inherited from BaseFunction
Constructor Details
This class inherits a constructor from FuncBot::Functions::BaseFunction
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/func_bot/templates/weather_function.rb', line 9 def execute weather_info = { location: parsed_response["location"], temperature: 98, forecast: ["sunny", "windy"] } JSON.dump(weather_info) end |