New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

slice_indexes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slice_indexes

0.0.1
Rubygems
Version published
Maintainers
1
Created
Source

Array#slice_indexes

Build Status Coverage Status Code Climate

Installation

Add this line to your application's Gemfile:

gem 'slice_indexes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install to_gal

Usage

Array#Indexes

require 'indexes'

[1, 2, 3, 1, 2].indexes 1

#=> [0, 3]

["foo", "bar", "baz", "foo", "baz", "foo"].indexes "foo"

#=> [0, 3, 5]

["foo", 1, 2, "foo", 3, "foo"].indexes { |i| i.class == String }

#=> [0, 3, 5]

Array#slice_indexes

require 'indexes'

[1, 2, 3, 1, 2].slice_indexes 1

#=> [[1, 2, 3], [1, 2]]

["foo", "bar", "baz", "foo", "baz", "foo"].slice_indexes "foo"

#=> [["foo", "bar", "baz"], ["foo", "baz"], ["foo"]]

["foo", 1, 2, "foo", 3, "foo"].slice_indexes { |i| i.class == String }

#=> [["foo", 1, 2], ["foo", 3], ["foo"]]

Contributing

  • Fork it ( http://github.com/onigra/slice_indexes/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 01 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts