Sharing Variables in Coffee Script

I have been hand-coding some client side validations in coffee script. And since some of the same validations get called in multiple places, I wanted a way to DRY up the code and have it more readable.
def something  
  if something_else
    play_ball
  end<!doctype html>
<html>
<head>
  <body style=’background: #dAc8b0;’>
    <h1 style=’text-align: center; color: #79604A;’>something <span style=’color: #772F32; font-size: 150%; position: relative; top: 0.2ex;padding-left: 10px; padding-right: 10px;’>Mindblowing</span> on its way</h1>
    <div style=’width: 600px; margin: 0 auto;’>
        <p style=’text-align: center; color: #79604A;’>Till then, listen to some of Sarah’s music</p>
        <p style=’text-align: center; color: #79604A;’>--Jack Desert<br>208.366.6059</p>
    
        <div style=’padding: 10px; background: white;’>
          <iframe width="300" height="410" style="position: relative; display: block; width: 300px; height: 410px;" src="http://bandcamp.com/EmbeddedPlayer/v=2/album=1194116270/size=grande3/bgcol=FFFFFF/linkcol=4285BB/" allowtransparency="true" frameborder="0"><a href="http://heartacre.bandcamp.com/album/climb">Climb by Heartacre</a></iframe>
        </div>
    </div>
  </body>
</html>
end
hi
hithere
    and
      then
        some
end
superuser_ids = [10879, 1862]
demo = Demo.find_by_name("H Engage @ Highmark")
expected_count = 3106
expected_count += superuser_ids.count
user_ids = User.where(:demo_id => demo.id).collect {|user| user.id if user.claimed?}
user_ids.reject! { |id| id.nil?}
user_ids += superuser_ids
subject = "An update on H Engage fan requests"
plain = "Hello - \n\nOver the last few weeks, activity on H Engage has seen quite a spike. As a result, you may have received an excessive number of \"fan\" requests from people you don’t know. Please accept our apologies, we realize that this is a disruption and have taken steps to address the issue. If you find that this is still happening, please contact support@hengage.com.\n\nOf course, the purpose of H Engage is to earn points for making healthy decisions and referring friends to do the same! Though the prize round is over, you can continue playing H Engage until the end of May.\n\n\"eat fruit\"\n\n- H Engage\n\n————————"
html = plain.gsub("\n\n", "<p>")
GenericMailer::BulkSender.delay.bulk_generic_messages(user_ids, subject, plain, html) if user_ids.count == expected_count