Skip to content

Instantly share code, notes, and snippets.

@bplexico
Created June 9, 2013 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bplexico/5745108 to your computer and use it in GitHub Desktop.
Save bplexico/5745108 to your computer and use it in GitHub Desktop.
pass in object itself
class ObserverSearchData
attr_reader :search_data
def initialize(obj, search_data)
@obj = obj
@search_data = search_data
end
def object_name
@obj.class.name.downcase
end
def id
@obj.id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment