I’m trying to use the google_search ruby library (code follows) but it complains that ‘cattr_accessor is an undefined method’ – any ideas why this might be or how I could fix it?
require 'rubygems'
require 'google_search'
GoogleSearch.web :q => "pink floyd"
cattr_accessorseems to be a Rails extension that acts likeattr_accessor, but is accessible on both the class and its instances.If you want to copy the source of the
cattr_accessormethod, check out this documentation: