class BrDanfe::MdfeLib::Document

Public Class Methods

new() click to toggle source
# File lib/br_danfe/mdfe_lib/document.rb, line 4
def initialize
  @document = BrDanfe::DocumentBuilder.build(
    page_size: 'A4',
    page_layout: :portrait
  )

  @document.font 'tinos'
end

Public Instance Methods

method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/br_danfe/mdfe_lib/document.rb, line 13
def method_missing(method_name, *args, &block)
  if @document.respond_to? method_name
    @document.send method_name, *args, &block
  else
    super
  end
end
respond_to_missing?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/br_danfe/mdfe_lib/document.rb, line 21
def respond_to_missing?(method_name, include_private = false)
  @document.respond_to?(method_name, include_private) || super
end