lib/banktools-se/account.rb in banktools-se-3.1.0 vs lib/banktools-se/account.rb in banktools-se-3.1.1
- old
+ new
@@ -48,12 +48,12 @@
bank_data[:name]
end
def clearing_number
[
- digits[0,4],
- checksum_for_clearing? ? digits[4,1] : nil
+ digits[0, 4],
+ checksum_for_clearing? ? digits[4, 1] : nil,
].compact.join("-")
end
def serial_number
number = digits.slice(clearing_number_length..-1) || ""
@@ -70,11 +70,11 @@
def clearing_number_length
checksum_for_clearing? ? 5 : 4
end
def bank_data
- number = digits[0,4].to_i
+ number = digits[0, 4].to_i
_, found_data = CLEARING_NUMBER_MAP.find { |interval, data| interval.include?(number) }
found_data || {}
end
def min_length
@@ -88,11 +88,11 @@
def max_length
if bank_data
Array(serial_number_length).last +
(checksum_for_clearing? ? 1 : 0)
else
- 1/0.0 # Infinity.
+ 1 / 0.0 # Infinity.
end
end
def serial_number_length
bank_data.fetch(:serial_number_length, DEFAULT_SERIAL_NUMBER_LENGTH)
@@ -105,10 +105,10 @@
def checksum_for_clearing?
bank_data[:checksum_for_clearing]
end
def digits
- number.to_s.gsub(/\D/, '')
+ number.to_s.gsub(/\D/, "")
end
def zerofill?
!!bank_data[:zerofill]
end