Method: JMESPath::Nodes::Slice#initialize

Defined in:
lib/jmespath/nodes/slice.rb

#initialize(start, stop, step) ⇒ Slice

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Slice.



6
7
8
9
10
11
# File 'lib/jmespath/nodes/slice.rb', line 6

def initialize(start, stop, step)
  @start = start
  @stop = stop
  @step = step
  raise Errors::InvalidValueError, 'slice step cannot be 0' if @step == 0
end