Linear workflow framework based on immutable state
StaticRecord is a module allowing to perform ActiveRecord-like queries over Ruby files. Those act as immutable database records that only developers can alter. Their attributes are stored in a SQLite3 database re-created on startup. Queries instantiate each retrieved records.
Immutable persistent matrix using Hamster that aims to copy as much of the API from Ruby's native Matrix class as possible
This library allows the creation of immutable objects from a hash.
A replacement for Struct that is immutable and has required keyword arguments.
Sometimes, your objects are only data and no behaviour. These are value objects, and they are defined by their _contents_. These objects are immutable, so it is safe to let them propagate throughout the system. Being immutable, value objects cannot be modified; their contents are set once on initialisation. Also, being identified by their contents, two entities with the same contents are considered equal.
Immutable, composable, multi-purpose middleware stack for Ruby
Library for creating contracted immutable(by default) value objects supported by contracts.ruby & ice_nine
This gem provides immutability validation. This is different from `readonly: true` stuff because it sets the error.
Examples of immutable data structures and functional programming in Ruby
Motion::Duration is an immutable type that represents some amount of time with accuracy in seconds.
Hamstar.update_having() lets you transform deep amalgams of Hamster (immutable) Hash and Vector with all the features of update_in() plus: associative selection [key,val], Kleene star '*', and generalized Proc-based matching
Validations for making ActiveRecord objects immutable.
Simple immutable data structure
Immutable Linked List implemented in C-Extensions
Creates and initializes an immutable struct in one step and provides redaction functionality.
Immutability in your Rails models
Allows you to define very simple classes with immutable variables, type safe constructors, and generated readers
== ICU4R - ICU Unicode bindings for Ruby ICU4R is an attempt to provide better Unicode support for Ruby, where it lacks for a long time. Current code is mostly rewritten string.c from Ruby 1.8.3. ICU4R is Ruby C-extension binding for ICU library[1] and provides following classes and functionality: * UString: - String-like class with internal UTF16 storage; - UCA rules for UString comparisons (<=>, casecmp); - encoding(codepage) conversion; \ - Unicode normalization; - transliteration, also rule-based; Bunch of locale-sensitive functions: - upcase/downcase; - string collation; \ - string search; - iterators over text line/word/char/sentence breaks; \ - message formatting (number/currency/string/time); - date and number parsing. * URegexp - unicode regular expressions. * UResourceBundle - access to resource bundles, including ICU locale data. * UCalendar - date manipulation and timezone info. * UConverter - codepage conversions API * UCollator - locale-sensitive string comparison == Install and usage > ruby extconf.rb > make && make check > make install Now, in your scripts just require 'icu4r'. To create RDoc, run > sh tools/doc.sh == Requirements To build and use ICU4R you will need GCC and ICU v3.4 libraries[2]. == Differences from Ruby String and Regexp classes === UString vs String 1. UString substring/index methods use UTF16 codeunit indexes, not code points. 2. UString supports most methods from String class. Missing methods are: capitalize, capitalize!, swapcase, swapcase! %, center, ljust, rjust chomp, chomp!, chop, chop! \ count, delete, delete!, squeeze, squeeze!, tr, tr!, tr_s, tr_s! crypt, intern, sum, unpack dump, each_byte, each_line hex, oct, to_i, to_sym reverse, reverse! succ, succ!, next, next!, upto 3. Instead of String#% method, UString#format is provided. See FORMATTING for short reference. 4. UStrings can be created via String.to_u(encoding='utf8') or global u(str,[encoding='utf8']) calls. Note that +encoding+ parameter must be value of String class. 5. There's difference between character grapheme, codepoint and codeunit. See UNICODE reports for gory details, but in short: locale dependent notion of character can be presented using more than one codepoint - base letter and combining (accents) (also possible more than one!), and each codepoint can require more than one codeunit to store (for UTF8 codeunit size is 8bit, though \ some codepoints require up to 4bytes). So, UString has normalization and locale dependent break iterators. 6. Currently UString doesn't include Enumerable module. 7. UString index/[] methods which accept URegexp, throw exception if Regexp passed. 8. UString#<=>, UString#casecmp use UCA rules. === URegexp UString uses ICU regexp library. Pattern syntax is described in [./docs/UNICODE_REGEXPS] and ICU docs. There are some differences between processing in Ruby Regexp and URegexp: 1. When UString#sub, UString#gsub are called with block, special vars ($~, $&, $1, ...) aren't set, as their values are processed through deep ruby core code. Instead, block receives UMatch object, which is essentially immutable array of matching groups: "test".u.gsub(ure("(e)(.)")) do |match| \ puts match[0] # => 'es' <--> $& puts match[1] # => 'e' \ <--> $1 puts match[2] # => 's' <--> $2 end 2. In URegexp search pattern backreferences are in form \n (\1, \2, ...), in replacement string - in form $1, $2, ... NOTE: URegexp considers char to be a digit NOT ONLY ASCII (0x0030-0x0039), but any Unicode char, which has property Decimal digit number (Nd), e.g.: a = [?$, 0x1D7D9].pack("U*").u * 2 puts a.inspect_names <U000024>DOLLAR SIGN <U01D7D9>MATHEMATICAL DOUBLE-STRUCK DIGIT ONE <U000024>DOLLAR SIGN <U01D7D9>MATHEMATICAL DOUBLE-STRUCK DIGIT ONE puts "abracadabra".u.gsub(/(b)/.U, a) abbracadabbra \ 3. One can create URegexp using global Kernel#ure function, Regexp#U, Regexp#to_u, or from UString using URegexp.new, e.g: /pattern/.U =~ "string".u 4. There are differences about Regexp and URegexp multiline matching options: t = "text\ntest" # ^,$ handling : URegexp multiline <-> Ruby default t.u =~ ure('^\w+$', URegexp::MULTILINE) => #<UMatch:0xf6f7de04 @ranges=[0..3], @cg=[\u0074\u0065\u0078\u0074]> t =~ /^\w+$/ => 0 # . matches \n : URegexp DOTALL <-> /m t.u =~ ure('.+test', URegexp::DOTALL) \ => #<UMatch:0xf6fa4d88 ... t.u =~ /.+test/m 5. UMatch.range(idx) returns range for capturing group idx. This range is in codeunits. === References 1. ICU Official Homepage http://ibm.com/software/globalization/icu/ 2. ICU downloads \ http://ibm.com/software/globalization/icu/downloads.jsp 3. ICU Home Page http://icu.sf.net 4. Unicode Home Page http://www.unicode.org ==== BUGS, DOCS, TO DO The code is slow and inefficient yet, is still highly experimental, so can have many security and memory leaks, bugs, inconsistent documentation, incomplete test suite. Use it at your own risk. Bug reports and feature requests are welcome :) === Copying This extension module is copyrighted free software by Nikolai Lugovoi. You can redistribute it and/or modify it under the terms of MIT License. Nikolai Lugovoi <meadow.nnick@gmail.com>
Enables immutable command objects to act as currable functions
Build complex URIs with chainability and immutability. No string concatenation required.
Thread-safe immutable objects that provide delegation and basic validation to hashes.
Generates memory-optimal immutable ActiveRecord dupes that are easily serializable and behaves much like ARs. Define required attributes before-hand and use them just as you would on an AR, for better memory optimization. Ideally, suitable in place of caching AR objects with cache stores like Memcached, where serialization and de-serialization are memory-hungry. Optars can save upto 90% of your memory(object allocations), while being upto 20x faster, when fetching huge AR results.
Make ActiveRecord objects immutable.
Simple, immutable model for github webhooks.
Immutable OpenStruct On Steroids, it combines Hash's and OpenStruct's semantics
A faster, immutable replacement for Ruby's Set
Immutable, keyword-argument based value objects for Ruby
RSchema extension to support Hamster's immutable Hash, Vector, List, Set. Immutable values, well-defined structures. Depends on tomdalling/rschema and hamstergem/hamster.
Make specific attributes of an ActiveRecord model immutable
Immutable value objects using Ruby Structs
collection of utilities for datamapper: optimistic get, conditional get, use-utc timestampt, tag model as immutable, etc
Small wrapper and functions for persistent, immutable data structures.
Allows easy creation of immutable union values, a.k.a. sum-types. Example: APICallResult = UnionValue.new(:success, :failure, :timeout) APICallResult.failure.is_failure? #=> true APICallResult.timeout.is_success? #=> false APICallResult.success(12345).data #=> 12345
[Ruby on Rails Training] Cryptodemo will allow us to perform safe transactions keeping an immutable chain state.
When we need work with an immutable stack. This is a simple implementation
Guava is a set of core libraries that includes new collection types (such as multimap and multiset), immutable collections, a graph library, and utilities for concurrency, I/O, hashing, primitives, strings, and more!
Fixed Models act like ActiveRecord models, but they are immutable and read from data files.
Database enforced timestamps, immutable columns, and counter/sum caches
Provides DSL for "modifying immutable objects"
Simple Immutable Relational Entity
Create static and immutable structures in Ruby.
Include "Lightning-Fast Modular CSS with No Side Effects" Basscss in Rails. Basscss is a lightweight collection of base element styles and immutable utilities designed for speed, clarity, performance, and scalability.
Immutable Attributes is an ActiveRecord extension that prevents existing data from changing
Immutable Attributes is an ActiveRecord extension that prevents existing data from changing
Killer Frost provides a simple and easy way to make objects immutable in Ruby. Creating immutable objects help to remove undesired side effects.
Declare methods as immutable.
Immutable configuration management for disposable infrastructures
I8 (Immutable) is an extension of Hamster with a convenient name.
Immutable