Class: PagSeguro::Document
- Inherits:
-
Object
- Object
- PagSeguro::Document
- Includes:
- Extensions::MassAssignment
- Defined in:
- lib/pagseguro/document.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Set the type.
-
#value ⇒ Object
Set the value.
Instance Method Summary collapse
Methods included from Extensions::MassAssignment
Instance Attribute Details
#type ⇒ Object
Set the type.
6 7 8 |
# File 'lib/pagseguro/document.rb', line 6 def type @type end |
#value ⇒ Object
Set the value.
9 10 11 |
# File 'lib/pagseguro/document.rb', line 9 def value @value end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/pagseguro/document.rb', line 11 def ==(other) [type, value] == [other.type, other.value] end |
#cnpj? ⇒ Boolean
19 20 21 |
# File 'lib/pagseguro/document.rb', line 19 def cnpj? type == 'CNPJ' end |
#cpf? ⇒ Boolean
15 16 17 |
# File 'lib/pagseguro/document.rb', line 15 def cpf? type == 'CPF' end |