Module: Pdf::DynamicComponents
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, **options, &block) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/pdf/dynamic_components.rb', line 5
def method_missing(name, *args, **options, &block)
if Pdf.component_registered?(name)
@blueprint.add(name, *args, **options, &block)
else
super
end
end
|
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
13
14
15
|
# File 'lib/pdf/dynamic_components.rb', line 13
def respond_to_missing?(name, include_private = false)
Pdf.component_registered?(name) || super
end
|