Sha256: 7887c195f95380bf394475f86c96b08dfbf944bd347fb7dba5f1a5a69593aa3d

Contents?: true

Size: 366 Bytes

Versions: 10

Compression:

Stored size: 366 Bytes

Contents

class UnboundMethod

  # Resolves the arguments of the method to have an
  # identialc signiture (useful to preserve arity).

  def arguments
    if (ar = arity) > 0
      args = []
      ar.times do |i|
        args << "a#{i}"
      end
      args = args.join(", ")
    elsif ar == 0
      args = ""
    else
      args = "*args"
    end
    return args
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.0.1 lib/core/facets/unboundmethod/arguments.rb
facets-2.0.0 lib/core/facets/unboundmethod/arguments.rb
facets-2.0.2 lib/core/facets/unboundmethod/arguments.rb
facets-2.0.5 lib/core/facets/unboundmethod/arguments.rb
facets-2.1.0 lib/core/facets/unboundmethod/arguments.rb
facets-2.1.1 lib/core/facets/unboundmethod/arguments.rb
facets-2.0.3 lib/core/facets/unboundmethod/arguments.rb
facets-2.1.2 lib/core/facets/unboundmethod/arguments.rb
facets-2.0.4 lib/core/facets/unboundmethod/arguments.rb
facets-2.1.3 lib/core/facets/unboundmethod/arguments.rb