Categories: None [Edit]
typed-array
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.
Total
Ranking: 32,461 of 183,107
Downloads: 35,575
Daily
Ranking: 53,556 of 183,092
Downloads: 1
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Owners
# | Gravatar | Handle |
---|---|---|
1 | yaauie |