Module: BrBoleto::HaveConta

Extended by:
ActiveSupport::Concern
Included in:
Boleto::Base, Remessa::Base, Retorno::Pagamento
Defined in:
lib/br_boleto/association/have_conta.rb

Instance Method Summary collapse

Instance Method Details

#conta {|conta| ... } ⇒ Object

Yields:



9
10
11
12
# File 'lib/br_boleto/association/have_conta.rb', line 9

def conta
	yield conta if block_given?
	get_conta
end

#conta=(value) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/br_boleto/association/have_conta.rb', line 14

def conta=(value)
	if value.is_a?(conta_class) || value.nil?
		@conta = value
	elsif value.is_a?(Hash)
		conta.assign_attributes(value)
	end
end

#conta_classObject

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/br_boleto/association/have_conta.rb', line 22

def conta_class
	raise NotImplementedError.new("Not implemented #conta_class in #{self}.")
end