instance method from

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

from(position)

Returns the tail of the array from position.

%w( a b c d ).from(0)  # => %w( a b c d )
%w( a b c d ).from(2)  # => %w( c d )
%w( a b c d ).from(10) # => nil
%w().from(0)           # => nil

Parameters

position req
Source
# File activesupport/lib/active_support/core_ext/array/access.rb, line 12
        def from(position)
          self[position..-1]
        end

Defined in activesupport/lib/active_support/core_ext/array/access.rb line 12 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::CoreExtensions::Array::Access

Type at least 2 characters to search.

↑↓ navigate · open · esc close