Class: Fact

Inherits:
Jarvis::Service show all
Defined in:
lib/jarvis/services/fact.rb

Instance Attribute Summary

Attributes inherited from Jarvis::Service

#message, #response

Instance Method Summary collapse

Methods inherited from Jarvis::Service

environment, #initialize, interpreter_pattern, invoke_with, #method_missing, phrases, #validate_environment

Constructor Details

This class inherits a constructor from Jarvis::Service

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Jarvis::Service

Instance Method Details

#runObject



4
5
6
# File 'lib/jarvis/services/fact.rb', line 4

def run
  Jarvis.get("http://numbersapi.com/random").unparsed_response
end