Class: BrDanfe::MdfeLib::Document
- Inherits:
-
Object
- Object
- BrDanfe::MdfeLib::Document
show all
- Defined in:
- lib/br_danfe/mdfe_lib/document.rb
Instance Method Summary
collapse
Constructor Details
4
5
6
7
8
9
10
11
|
# 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
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/br_danfe/mdfe_lib/document.rb', line 13
def method_missing(method_name, ...)
if @document.respond_to? method_name
@document.send(method_name, ...)
else
super
end
end
|
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
21
22
23
|
# 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
|