title: Ruby on Rails Classes
body: <p>Does a class in RoR automatically initiate the first method when a new object of that class is created? </p>
  
  <pre><code>class User
   attr_accessor :name, :email
  
   def initialize(attributes = {})
    @name  = attributes[:name]
    @email = attributes[:email]
   end
  
   def formatted_email
    "#{@name} &lt;#{@email}&gt;"
   end
  end
  </code></pre>
  
  <p>Say I create a new User like this</p>
  
  <pre><code>connor = User.new(name: "Connor B", email: "CB@example.com")
  </code></pre>
  
  <p>How does it know to automatically start the first method but the second method only works when called upon?</p>