No commit activity in last 3 years
No release in over 3 years
Defines accessor methods for instance variables using clojure's atoms, for thread safety
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

atom_attr_accessor

Ruby gem to provide accessor methods using clojure atoms. This lets you create Ruby classes with thread safe instance variables.

usage

require 'atom_attr_accessor'

class ThreadSafeEmployee
	atom_attr_accessor :id, :name, :salary

end

t = ThreadSafeEmployee.new
t.id = 1 # this will create a new Atom
t.id += 1 # this will invoke .reset on it
t.id # this will invoke deref on it