Module Selectable
In: lib/selectable/object.rb
lib/selectable/tags.rb
lib/selectable.rb

Selectable

<strong>Note: Classes that include Selectable must also subclass Array</strong>

    class Something < Array
      include Selectable
    end

Methods

filter   filter!   included   normalize   rfilter   tags  

Classes and Modules

Module Selectable::Object
Class Selectable::SelectableError
Class Selectable::Tags
Class Selectable::TagsNotInitialized

Public Class methods

Creates an alias for filter called +[]+, but only if [] doesn‘t already exist in obj.

Returns a Hash or Array

Public Instance methods

Return the objects that match the given tags. This process is optimized for speed so there as few conditions as possible. One result of that decision is that it does not gracefully handle error conditions. For example, if the tags in an object have not been initialized, you will see this error:

    undefined method `>=' for nil:NilClass

It also means you need be aware of the types of objects you are storing as values. If you store a Symbol, you must send a Symbol here.

[Validate]