Class: Namaskar
- Inherits:
-
Object
- Object
- Namaskar
- Defined in:
- lib/namaskar.rb
Class Method Summary collapse
Class Method Details
.get_api ⇒ Object
16 17 18 19 20 |
# File 'lib/namaskar.rb', line 16 def self.get_api # Indico.api_key = 'abcd' deci = Indico.sentiment_hq(@text) @percentage = deci* 100; end |
.hi ⇒ Object
6 7 8 |
# File 'lib/namaskar.rb', line 6 def self.hi puts "नमस्कार, Stay positive and happy" end |
.my_feelings(text) ⇒ Object
10 11 12 13 14 |
# 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 |