diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-05-16 02:41:14 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-05-16 03:08:23 -0600 |
| commit | 65cb0f745ffa0c4092ee23e43580730e0f40380e (patch) | |
| tree | 672788a226760ce487b83658625010804cfd681f | |
| parent | 23a295c371e5b9da122996c55e9d064eb3df1909 (diff) | |
qualify prototype as scratch_prototype
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 8 | ||||
| -rw-r--r-- | lib/asciidoctor/pdf/ext/prawn/extensions.rb | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index e1035556..e8629007 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -411,7 +411,7 @@ module Asciidoctor if (@optimize = doc.attr 'optimize') @optimize = nil unless (defined? ::Asciidoctor::PDF::Optimizer) || !(Helpers.require_library OptimizerRequirePath, 'rghost', :warn).nil? # rubocop:disable Style/SoleNestedConditional end - allocate_prototype + allocate_scratch_prototype self end @@ -4950,7 +4950,7 @@ module Asciidoctor result end - def create_prototype + def create_scratch_prototype @label = :scratch @save_state = nil @scratch_depth = 0 @@ -4967,7 +4967,7 @@ module Asciidoctor end def init_scratch originator - @prototype = originator.instance_variable_get :@prototype + @scratch_prototype = originator.instance_variable_get :@scratch_prototype @tmp_files = originator.instance_variable_get :@tmp_files text_formatter.scratch = true self @@ -4992,7 +4992,7 @@ module Asciidoctor def clear_scratch @scratch_depth = 0 - @save_state = @prototype = @scratch = nil + @save_state = @scratch_prototype = @scratch = nil end end end diff --git a/lib/asciidoctor/pdf/ext/prawn/extensions.rb b/lib/asciidoctor/pdf/ext/prawn/extensions.rb index 07e8059d..f17a1fda 100644 --- a/lib/asciidoctor/pdf/ext/prawn/extensions.rb +++ b/lib/asciidoctor/pdf/ext/prawn/extensions.rb @@ -954,14 +954,14 @@ module Asciidoctor perform_discretely { start_new_page options } end - # Grouping + # Scratch - def allocate_prototype - @prototype = create_prototype { ::Marshal.load ::Marshal.dump self } + def allocate_scratch_prototype + @scratch_prototype = create_scratch_prototype { ::Marshal.load ::Marshal.dump self } end def scratch - @scratch ||= ((Marshal.load Marshal.dump @prototype).send :init_scratch, self) + @scratch ||= ((Marshal.load Marshal.dump @scratch_prototype).send :init_scratch, self) end def scratch? |
