title: What is the !! and a few other things in Ruby?
body: <p>I have been digging through some ruby gem code and i came across these and not sure what they means</p>
  
  <pre><code>def success?
    !!@success
  end
  
  def failure?
    !@success
  end
  
  cattr_accessor :test_response
  </code></pre>
  
  <p>and lastly this chunk of code</p>
  
  <pre><code>class_inheritable_accessor :attributes
  self.attributes = []
  
  def self.attribute(name, options={})
    top_level_name = name.to_s.split(".").last.underscore
    define_method top_level_name do
      read_attribute name
    end
  </code></pre>
  
  <p>If you only know one or two thats fine ...i just want to understand them...thanks</p>