Skip to content

Commit

Permalink
optimize the scratch? method
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Jun 9, 2015
1 parent b4a0688 commit b27e700
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/asciidoctor-pdf/prawn_ext/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,10 @@ def get_scratch_document
end
end

def is_scratch?
!!state.store.info.data[:Scratch]
def scratch?
(@_label ||= (state.store.info.data[:Scratch] ? :scratch : :primary)) == :scratch
end
alias :scratch? :is_scratch?
alias :is_scratch? :scratch?

# TODO document me
def dry_run &block
Expand Down

0 comments on commit b27e700

Please sign in to comment.