RubyGems Navigation menu

typed-array 0.1.2

All methods that alter the contents of an array that implements this Gem are first checked to ensure that the added items are of the types allowed. All methods behave exactly as their Array counterparts, including additional forms, block processing, etc. Defining a TypedArray Class: ```ruby class ThingsArray < Array extend TypedArray restrict_types Thing1, Thing2 end things = ThingsArray.new ``` Generating a single TypedArray ```ruby things = TypedArray(Thing1,Thing2).new These classes can be extended, and their accepted-types appended to after their initial definition.

Versions:

  1. 0.1.2 - August 3, 2011 (10.5 KB)
  2. 0.1.1 - August 3, 2011 (10.5 KB)

Authors:

  • Ryan Biesemeyer

Owners:

3479922787c0872400d1bbed08247f4f

Total downloads 8,045

For this version 7,036

Required Ruby Version: None

Licenses:

N/A

Gemfile:
gem 'typed-array', '~> 0.1.2' = Copy to clipboard Copied!

install:
gem install typed-array = Copy to clipboard Copied!

Links: