Sha256: a4fa324d0a651f4dbfbcc31400d722cb63b10778b7d4b25a10adbb0c6bd6bbb9

Contents?: true

Size: 671 Bytes

Versions: 13

Compression:

Stored size: 671 Bytes

Contents

require 'plaid/util'
module Plaid
  class Institution
    include Plaid::Util

    attr_accessor(:id, :name, :type, :has_mfa, :mfa, :inst_array)

    def instantiate_all_institutions(res)
      self.inst_array = []
      res.each do |inst|
        institution = Institution.new
        inst_array << institution.build_institution(inst)
      end
      self.inst_array
    end

    def instantiate_one_institution(res)
      self.build_institution(res)
      self
    end

    protected

    def build_institution(inst)
      self.id = inst['id'], self.name = inst['name'], self.type = inst['type'], self.has_mfa =inst['has_mfa'], self.mfa = inst['mfa']
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
plaid-1.4.3 lib/plaid/institution/institution.rb
plaid-1.4.2 lib/plaid/institution/institution.rb
plaid-1.4.1 lib/plaid/institution/institution.rb
plaid-1.4.0 lib/plaid/institution/institution.rb
plaid-1.3.0 lib/plaid/institution/institution.rb
plaid-1.2.3 lib/plaid/institution/institution.rb
plaid-1.2.2 lib/plaid/institution/institution.rb
plaid-1.1.2 lib/plaid/institution/institution.rb
plaid-1.2.1 lib/plaid/institution/institution.rb
plaid-1.2.0 lib/plaid/institution/institution.rb
plaid-1.1.1 lib/plaid/institution/institution.rb
plaid-1.1.0 lib/plaid/institution/institution.rb
plaid-1.0.1 lib/plaid/institution/institution.rb