Class: Proc

Inherits:
Object
  • Object
show all
Defined in:
lib/shoes/inspect.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) inspect(hits = nil)



85
86
87
88
89
90
91
92
93
94
# File 'lib/shoes/inspect.rb', line 85

def inspect(hits = nil)
    v = "a"
    pvars = []
    (arity < 0 ? -(arity+1) : arity).times do |i|
        pvars << v
        v = v.succ
    end
    pvars << "*#{v}" if arity < 0
    "(Proc |#{pvars.join(',')}|)"
end