< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous artilce (have the same parent)
N :the next (in thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
On 18.02.2010 20:57, Glenn Ritz wrote:
> I would like to add self to an Enumerable object in Ruby 1.9, like in
> this (admittedly) contrived example:
>
> %w(cat dog mouse).each.with_self { |e, s| puts "self: #{s.inspect}, e:
> #{e}" }
>
> The results of the above code would be:
>
> self: ['cat','dog', 'mouse'], e: cat
> self: ['cat','dog', 'mouse'], e: dog
> self: ['cat','dog', 'mouse'], e: mouse
>
> I think of the 'with_self' method (which I want to define) as being
> similar to the with_index method [...]
>
module Enumerable
def with_self
return enum_for(:with_self) unless block_given?
each {|e| yield e, self}
end
end