def use(mixin)
      # templates and partials are just blocks themselves so they just need to
      # be added to the workbook element
      # they will be instance eval'd when they get used
      (mixin.templates || []).each { |mt| template(*mt.args, &mt.build) }
      (mixin.partials  || []).each { |mp| partial(*mp.args, &mp.build)  }

      # styles not only need to be added to the workbook element, but
      # any build passed to the style needs to be instance eval'd
      (mixin.styles || []).each do |ms|
        StyleBuild.new(self, *ms.args, &ms.build).add do |build|
          instance_eval(&build)
        end
      end
    end
def use(mixin)
      # templates and partials are just blocks themselves so they just need to
      # be added to the workbook element
      # they will be instance eval'd when they get used
      (mixin.templates || []).each { |mt| template(*mt.args, &mt.build) }
      (mixin.partials  || []).each { |mp| partial(*mp.args, &mp.build)  }

      # styles not only need to be added to the workbook element, but
      # any build passed to the style needs to be instance eval'd
      (mixin.styles || []).each do |ms|
        StyleBuild.new(self, *ms.args, &ms.build).add do |build|
          instance_eval(&build)
        end
      end
    end
use a mixin to define its markup handlers (templates, partials, and styles)
 in your workbook scope
 all blocks in mixins will be instance eval'd in the workbook scope
 and should be written as such