Regina Imhoff

Software Engineer in Austin, Texas

Tag: ruby on rails

Ruby’s Method Lookup

In many programming languages you are able to lookup methods without much trouble – just start at the receiver and work up the chain until you find the method you want.  However, in Ruby, you are able to mix in modules and singleton classes, so it gets weird fast.

There are just a few steps on how Ruby looks up methods:

  1.  Look within singleton class
    • A singleton method is a method that is defined on a instance vs. to a class where the method would be available on all instances
  2.  Look within modules that extend singleton classes
    • If you can’t find the method on the singleton class, look at modules that extend the singleton class
    • If there are multiple extend modules, the later modules are more important and take precedence
  3.  Look within methods prepended to the method and methods defined on a class
  4.  Look within modules that were mixed in when class was defined
  5.  Look up the ancestor chain
  6.  Start again checking method_missing

Employee Recognition

This term I’m taking my senior capstone project and we were tasked with making  an employee recognition site where users can make an award and it gets emailed to the recipient!  The live project site:  http://rocky-ridge-55037.herokuapp.com/  and code: https://github.com/StabbyMcDuck/employee_recognition

Neo4j + RoR

Here’s a link to the slides from my talk last night at Austin on Rails.  I had a lot of fun seeing everybody’s lightening talks!

Neo4j + RoR (PDF)

 

 

© 2017 Regina Imhoff

Theme by Anders NorenUp ↑