Sha256: 137840eef2e91237753e5ade4d00bd6fd2c2e71437f2edafcfa062e938a9fb90

Contents?: true

Size: 590 Bytes

Versions: 9

Compression:

Stored size: 590 Bytes

Contents

class DummyUser
  include ActiveModel::Validations
  validates :iban, iban: true
  validates :bic, bic: true
  validates :routing_number, routing_number: true

  attr_accessor :iban

  def initialize(attributes = {})
    @iban = attributes[:iban]
    @bic = attributes[:bic]
    @routing_number = attributes[:routing_number]
  end

  def save
    if valid?
      return true
    else
      return false
    end
  end

  def self.create(attributes = {})
    new(attributes).save
  end

  def iban
    @iban
  end

  def bic
    @bic
  end

  def routing_number
    @routing_number
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bank-validator-0.3.2 test/dummy_classes/dummy_user.rb
bank-validator-0.3.1 test/dummy_classes/dummy_user.rb
bank-validator-0.3.0 test/dummy_classes/dummy_user.rb
bank-validator-0.2.8 test/dummy_classes/dummy_user.rb
bank-validator-0.2.7 test/dummy_classes/dummy_user.rb
bank-validator-0.2.6 test/dummy_classes/dummy_user.rb
bank-validator-0.2.5 test/dummy_classes/dummy_user.rb
bank-validator-0.2.4 test/dummy_classes/dummy_user.rb
bank-validator-0.2.3 test/dummy_classes/dummy_user.rb