Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created March 12, 2009 04:22
Show Gist options
  • Save johnbender/77900 to your computer and use it in GitHub Desktop.
Save johnbender/77900 to your computer and use it in GitHub Desktop.
class PostQuery < Query
@@clauses = [:columns, :operations, :order]
def initialize(target_object)
super(target_object, @@clauses)
end
@@clauses.each do |c|
define_method(c){ self[c] }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment