Class: ComplexEmotions

Inherits:
Common
  • Object
show all
Defined in:
lib/artemo/complex_emotions.rb

Overview

Note:

This class analyze complex emotions

Returns of sum of sorted complex emotions.

Returns:

  • (Array)

    of sum of sorted complex emotions

Class Method Summary collapse

Methods inherited from Common

check, scale, weigh

Class Method Details

.call(array_one) ⇒ Object

Note:

This method initializes class



7
8
9
10
11
12
13
14
15
# File 'lib/artemo/complex_emotions.rb', line 7

def self.call(array_one)
  summed_array = sum(array_one)
  reversed_hash = reverse(summed_array)
  removed_array = remove(reversed_hash.values)
  scaled_array = scale(removed_array)
  checked_array = check(scaled_array)
  weighed_array = weigh(scaled_array, checked_array)
  scale(weighed_array)
end