This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Extractor | |
def strip(field) | |
field&.gsub(/\n/, " ")&.gsub(/<.*?>/, "") | |
end | |
def extract(vertical) | |
questionnaire = X_Rated::Quoting::ChopinEngine.questionnaire_for({ Site: 'uk' }, vertical: vertical) | |
qs = questionnaire.questions(unasked: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To use, put this somewhere on the load path in Chopin OR add its directory to the load path eg. $: << (path to this file) | |
# require 'excess_extractor' | |
# | |
# Then ExcessExtractor.new.show and you will get your out put. | |
class ExcessExtractor | |
def show | |
X_Rated::Rating::Repository.load_all_models | |
chopin_models = X_Rated::Rating::Repository.rating_models.rating_models['Chopin'] |