Class: SecurityIdentifiers::Base
- Inherits:
-
Object
- Object
- SecurityIdentifiers::Base
- Defined in:
- lib/security_identifiers/base.rb
Instance Attribute Summary collapse
-
#original_check_digit ⇒ Object
readonly
Returns the value of attribute original_check_digit.
Instance Method Summary collapse
Instance Attribute Details
#original_check_digit ⇒ Object (readonly)
Returns the value of attribute original_check_digit.
6 7 8 |
# File 'lib/security_identifiers/base.rb', line 6 def original_check_digit @original_check_digit end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/security_identifiers/base.rb', line 12 def to_s "#{@identifier}#{check_digit}" end |
#valid? ⇒ Boolean
8 9 10 |
# File 'lib/security_identifiers/base.rb', line 8 def valid? @original_check_digit.to_i == check_digit end |