<commit_before>module Plaid
  # Public: A class encapsulating information about a Financial Institution
  # supported by Plaid.
  class Institution
    # Public: The String institution ID. E.g. "5301a93ac140de84910000e0".
    attr_reader :id

    # Public: The String institution name. E.g. "Bank of America".
    attr_reader :name

    # Public: The String institution shortname, or "type" per Plaid API docs.
    # E.g. "bofa".
    attr_reader :type

    # Public: The Boolean flag telling if the institution requires MFA.
    attr_reader :has_mfa

    # Public: The Hash with MFA options available. E.g. ["code", "list",
    # "questions(3)"]. This means that you are allowed to request a list of
    # possible MFA options, use code-based MFA and questions MFA (there are 3
    # questions).
    attr_reader :mfa

    # Public: The Hash with credential labels, how they are exactly named by
    # the institution. E.g. {"username": "Online ID", "password": "Password"}.
    attr_reader :credentials

    # Public: An Array with Symbol product names supported by the institution.
    # E.g. [:connect, :auth, :balance, :info, :income, :risk]. See
    # Plaid::PRODUCTS.
    attr_reader :products

    # Private: Initialize an Institution with given fields.
    def initialize(fields)
      @id = fields['id']
      @name = fields['name']
      @type = fields['type']
      @has_mfa = fields['has_mfa']
      @mfa = fields['mfa']
      @credentials = fields['credentials']
      @products = fields['products'].map(&:to_sym)<commit_msg>Institution#has_mfa?<commit_after>module Plaid
  # Public: A class encapsulating information about a Financial Institution
  # supported by Plaid.
  class Institution
    # Public: The String institution ID. E.g. "5301a93ac140de84910000e0".
    attr_reader :id

    # Public: The String institution name. E.g. "Bank of America".
    attr_reader :name

    # Public: The String institution shortname, or "type" per Plaid API docs.
    # E.g. "bofa".
    attr_reader :type

    # Public: The Boolean flag telling if the institution requires MFA.
    attr_reader :has_mfa

    # Public: Returns true if the institution requires MFA.
    alias has_mfa? has_mfa

    # Public: The Hash with MFA options available. E.g. ["code", "list",
    # "questions(3)"]. This means that you are allowed to request a list of
    # possible MFA options, use code-based MFA and questions MFA (there are 3
    # questions).
    attr_reader :mfa

    # Public: The Hash with credential labels, how they are exactly named by
    # the institution. E.g. {"username": "Online ID", "password": "Password"}.
    attr_reader :credentials

    # Public: An Array with Symbol product names supported by the institution.
    # E.g. [:connect, :auth, :balance, :info, :income, :risk]. See
    # Plaid::PRODUCTS.
    attr_reader :products

    # Private: Initialize an Institution with given fields.
    def initialize(fields)
      @id = fields['id']
      @name = fields['name']
      @type = fields['type']
      @has_mfa = fields['has_mfa']
      @mfa = fields['mfa']
      @credentials = fields['credentials']
      @products = fields['products'].map(&:to_sym)
{'fraction_non_alphanumeric': 0.10792047964657621, 'fraction_numerical': 0.012622278321236984, 'mean_word_length': 3.176548089591568, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '6505559', 'n_tokens_mistral': 991, 'n_tokens_neox': 932, 'n_words': 344}