Class: BinData::Record

Inherits:
Struct
  • Object
show all
Defined in:
lib/cnab240/ext/bindata.rb

Instance Method Summary collapse

Instance Method Details

#linhaObject

lulz



3
4
5
6
7
8
9
# File 'lib/cnab240/ext/bindata.rb', line 3

def linha # lulz
	self.auto_fill if self.respond_to?(:auto_fill) && Cnab240.auto_fill_enabled
	s = StringIO.new
	self.write(s)
	raise "Invalid line length #{s.string.length}" unless (s.string.length == 240)  || self.respond_to?(:lote)
	s.string
end