Skip to content

Instantly share code, notes, and snippets.

Created February 11, 2016 05:20
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 anonymous/74b77a1c17d387f1d32b to your computer and use it in GitHub Desktop.
Save anonymous/74b77a1c17d387f1d32b to your computer and use it in GitHub Desktop.
class myobj
attr_accessor :test
def initialize
@ar_obj = AR::Object
end
def inc( col_var, amount=1 )
@ar_obj.send "#{col_var.to_s}+=", amount
end
end
obj = myobj.new
obj.inc( :processed_count, 1 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment