Sha256: 35af7034dddd7f64e2d9a2863c028094a3bf879c5c1a9890ad5ca3f5e1ebd31a

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

require 'ruby_xml_nfe/fat'
require 'ruby_xml_nfe/dup'

module RubyXmlNfe
  class Cobr
    attr_reader :xml, :fat_params, :tag_dup

    def initialize(xml, params)
      @xml = xml
      @fat_params = params[:fat]
      @tag_dup = params[:dup]
    end

    def build
      xml.cobr do
        fat = RubyXmlNfe::Fat.new(xml, fat_params)
        fat.build

        tag_dup.map do |dup_params|
          _dup = RubyXmlNfe::Dup.new(xml, dup_params)
          _dup.build
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_xml_nfe-0.1.0 lib/ruby_xml_nfe/cobr.rb