title: Code Walkthrough for a Ruby on Rails Newbie
body: <p>I am trying to understand how to use a ruby on rails library. I am new and can't even understand the most basic example. The library I am trying to use is called statsample. Can someone help walk me through what is going in this code snippet:</p>
  
  <pre><code>$:.unshift(File.dirname(__FILE__)+'/../lib/')
  require 'statsample'
  
      Statsample::Analysis.store(Statsample::Dataset) do
        samples=1000
        a=Statsample::Vector.new_scale(samples) {r=rand(5); r==4 ? nil: r}
        b=Statsample::Vector.new_scale(samples) {r=rand(5); r==4 ? nil: r}
  
        ds={'a'=&gt;a,'b'=&gt;b}.to_dataset
        summary(ds)
      end
  
      if __FILE__==$0
        Statsample::Analysis.run_batch
      end
  </code></pre>