Class: RubyXmlNfe::Cobr
- Inherits:
-
Object
- Object
- RubyXmlNfe::Cobr
- Defined in:
- lib/ruby_xml_nfe/cobr.rb
Instance Attribute Summary collapse
-
#fat_params ⇒ Object
readonly
Returns the value of attribute fat_params.
-
#tag_dup ⇒ Object
readonly
Returns the value of attribute tag_dup.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(xml, params) ⇒ Cobr
constructor
A new instance of Cobr.
Constructor Details
#initialize(xml, params) ⇒ Cobr
Returns a new instance of Cobr.
8 9 10 11 12 |
# File 'lib/ruby_xml_nfe/cobr.rb', line 8 def initialize(xml, params) @xml = xml @fat_params = params[:fat] @tag_dup = params[:dup] end |
Instance Attribute Details
#fat_params ⇒ Object (readonly)
Returns the value of attribute fat_params.
6 7 8 |
# File 'lib/ruby_xml_nfe/cobr.rb', line 6 def fat_params @fat_params end |
#tag_dup ⇒ Object (readonly)
Returns the value of attribute tag_dup.
6 7 8 |
# File 'lib/ruby_xml_nfe/cobr.rb', line 6 def tag_dup @tag_dup end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
6 7 8 |
# File 'lib/ruby_xml_nfe/cobr.rb', line 6 def xml @xml end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ruby_xml_nfe/cobr.rb', line 14 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 |