Sha256: 5d721449b195deb04b1647e00493a4451355a1d0dfd08910939158cd75cbf394

Contents?: true

Size: 604 Bytes

Versions: 18

Compression:

Stored size: 604 Bytes

Contents

module BrDanfe
  module MdfeLib
    class Document
      def initialize
        @document = BrDanfe::DocumentBuilder.build(
          page_size: 'A4',
          page_layout: :portrait
        )

        @document.font 'tinos'
      end

      def method_missing(method_name, *args, &block)
        if @document.respond_to? method_name
          @document.send method_name, *args, &block
        else
          super
        end
      end

      def respond_to_missing?(method_name, include_private = false)
        @document.respond_to?(method_name, include_private) || super
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
br_danfe-1.2.2 lib/br_danfe/mdfe_lib/document.rb
br_danfe-1.2.1 lib/br_danfe/mdfe_lib/document.rb
br_danfe-1.2.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-1.1.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-1.0.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.20.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.19.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.18.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.8 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.7 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.6 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.5 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.4 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.3 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.2 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.1 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.17.0 lib/br_danfe/mdfe_lib/document.rb
br_danfe-0.16.0 lib/br_danfe/mdfe_lib/document.rb