class Namaskar
Public Class Methods
get_api()
click to toggle source
# File lib/namaskar.rb, line 16 def self.get_api # Indico.api_key = 'abcd' deci = Indico.sentiment_hq(@text) @percentage = deci* 100; end
hi()
click to toggle source
# File lib/namaskar.rb, line 6 def self.hi puts "नमस्कार, Stay positive and happy" end
my_feelings(text)
click to toggle source
# File lib/namaskar.rb, line 10 def self.my_feelings(text) @text = text get_api return "Your day was #{@percentage}% happy and #{100 - @percentage}% sad" end