Class: Boletoman::Boleto

Inherits:
Object
  • Object
show all
Defined in:
lib/boletoman/boleto.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pdf_generator_instance) ⇒ Boleto

Returns a new instance of Boleto.



5
6
7
# File 'lib/boletoman/boleto.rb', line 5

def initialize(pdf_generator_instance)
  @pdf_generator_instance = pdf_generator_instance
end

Instance Attribute Details

#pdf_generator_instanceObject (readonly)

Returns the value of attribute pdf_generator_instance.



3
4
5
# File 'lib/boletoman/boleto.rb', line 3

def pdf_generator_instance
  @pdf_generator_instance
end

Instance Method Details

#barcodeObject



13
14
15
# File 'lib/boletoman/boleto.rb', line 13

def barcode
  pdf_generator_instance.codigo_barras
end

#lineObject



9
10
11
# File 'lib/boletoman/boleto.rb', line 9

def line
  pdf_generator_instance.codigo_barras.linha_digitavel
end

#nosso_numeroObject



17
18
19
# File 'lib/boletoman/boleto.rb', line 17

def nosso_numero
  pdf_generator_instance.nosso_numero_boleto
end

#pdfObject



21
22
23
# File 'lib/boletoman/boleto.rb', line 21

def pdf
  pdf_generator_instance.to_pdf
end