Method: Savage::Path#initialize

Defined in:
lib/ext/savage/lib/savage/path.rb

#initialize(*args) {|_self| ... } ⇒ Path

Returns a new instance of Path.

Yields:

  • (_self)

Yield Parameters:

  • _self (Savage::Path)

    the object that the method was called on



18
19
20
21
22
# File 'lib/ext/savage/lib/savage/path.rb', line 18

def initialize(*args)
  @subpaths = [SubPath.new]
  @subpaths.last.move_to(*args) if (2..3).include?(*args.length)
  yield self if block_given?
end