<commit_before>const request = require('request');

export default class Bank {
  constructor(bankName, bankURL) {
    this.name = bankName;
    this.url = bankURL;
  }

  /**
   * Request then pass html to scraper function for scraping
   * @param {function} scraper
   */
  scrape(scraper, finish) {
    request(this.url, (error, response, html) => {
      /**
       * [rates description]
       * @type {Array} rates [
       *                      {
       *                        code: USD, //currency iso code
       *                        buy: 20.4,
       *                        sell: 18.25
       *                      },
       *                      {
       *                        code: EUR,
       *                        buy: 18,
       *                        sell: 16.5
       *                      }
       *                     ]
       */
      let rates = null;
      if (!error && response.statusCode === 200) {
        rates = scraper(html);
      }

      finish(rates);
    });
  }
}<commit_msg>Make Bank its scraper instead passing it<commit_after>const request = require('request');

export default class Bank {
  constructor(bankName, bankURL) {
    this.name = bankName;
    this.url = bankURL;
  }

  /**
   * Request then pass html to scraper function for scraping
   * @param {function} scraper
   */
  scrape(finish) {
    request(this.url, (error, response, html) => {
      /**
       * [rates description]
       * @type {Array} rates [
       *                      {
       *                        code: USD, //currency iso code
       *                        buy: 20.4,
       *                        sell: 18.25
       *                      },
       *                      {
       *                        code: EUR,
       *                        buy: 18,
       *                        sell: 16.5
       *                      }
       *                     ]
       */
      let rates = null;
      if (!error && response.statusCode === 200) {
        rates = this.scraper(html);
      }

      finish(rates);
    });
  }
}
{'fraction_non_alphanumeric': 0.11031175059952038, 'fraction_numerical': 0.014388489208633094, 'mean_word_length': 0.9477124183006536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2594530', 'n_tokens_mistral': 593, 'n_tokens_neox': 531, 'n_words': 127}