title: Chef - Local variables within ruby_block
body: <p>First time using chef/ruby</p>
  
  <pre><code>buildNumber = String.new
  
  ruby_block 'test' do
    block do
      def parse_xml
        buildNumber = "123"
      end
  
      parse_xml do
      end
  
      print "buildNumber is: " +buildNumber
    end
    action :run
  end
  </code></pre>
  
  <p>I want the line <code>print "buildNumber is: " +buildNumber</code> to print out 123 and not blank, how can I achieve this? </p>