0.0
No commit activity in last 3 years
No release in over 3 years
AttrImmutable add the attr_immutable class method to create immutable properties on Ruby classes. The attribute are only accessible using the accessor/mutator pair by hiding the attribute value using a closure. (ie. the immutable attribute is not stored in an instance variable and therefore can't be accessed in any other way. No developer end runs.)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.6
 Project Readme

Description¶ ↑

A simple class method to create immutable attributes in the style or attr_attributes, attr_reader, attr_writer, etc.

Requirements¶ ↑

JRuby

Usage¶ ↑

Install the gem:

gem install attr_immutable

Run the code:

class ImmutableFoo
  attr_immutable :foo

end

foo = Foo.new
foo.foo = 'Set the value'
foo.foo = 'Oops! This will raise an error' # <= This will raise a runtime error.

History¶ ↑

SimpleWorkQueue is a fork of WorkQueue by Miguel Fonseca. SimpleWorkQueue removes the time out and bounded task queue. The timeout created issues under the concurrency implementation in JRuby. The time out mechanism was replaced using a non-blocking queue from the java.util.concurrent library. If a worker thread attempts to remove a task from the task queue and it is empty it will exit the worker thread.