Class: Turkee::TurkeeStudy

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/models/turkee_study.rb

Constant Summary collapse

GOLD_RESPONSE_INDEX =
3

Instance Method Summary collapse

Instance Method Details

#approve?Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/models/turkee_study.rb', line 6

def approve?
  words = feedback.split(/\W+/)
  gold_response.present? ? (gold_response == words[GOLD_RESPONSE_INDEX]) : true
end