Working with Resources in Ruby