Module: BrNfe::Helper::HaveRps
- Included in:
- Servico::Betha::V1::ConsultaNfsPorRps, Servico::Betha::V2::ConsultaNfsePorRps, Servico::Betha::V2::GeraNfse, Servico::Betha::V2::SubstituicaoNfse
- Defined in:
- lib/br_nfe/helper/have_rps.rb
Instance Method Summary collapse
Instance Method Details
#rps {|rps| ... } ⇒ Object
4 5 6 7 |
# File 'lib/br_nfe/helper/have_rps.rb', line 4 def rps yield rps if block_given? @rps.is_a?(BrNfe.rps_class) ? @rps : @rps = BrNfe.rps_class.new end |
#rps=(value) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/br_nfe/helper/have_rps.rb', line 9 def rps=(value) if value.is_a?(BrNfe.rps_class) || value.nil? @rps = value elsif value.is_a?(Hash) rps.assign_attributes(value) end end |