cygnet
is currently comprised of two parts:
-
An implementation of the Null Object Pattern, which automatically accounts for nil.
-
An implementation of collections.
$ rails c
[1] pry(main)> something = Cygnet::NullObject.new
=> <#Cygnet::NullObject ...>
[2] pry(main)> something.doesnotexist
=> <#Cygnet::NullObject ...>
[3] pry(main)> collection = Cygnet::PaginatedCollection.new(MyBuilderClass, [records, to, put, in, collection], {:page=>1, :per_page=>20})