Class: Array

Inherits:
Object show all
Defined in:
lib/review/extentions/array.rb

Instance Method Summary collapse

Instance Method Details

#map(&block) ⇒ Object

Ruby 1.8



17
18
19
20
21
22
23
# File 'lib/review/extentions/array.rb', line 17

def map(&block)
  if !block_given?
    return to_enum :map
  else
    collect(&block) ## XXX same as original
  end
end

#to_docObject

for ReVIEW::Node



5
6
7
# File 'lib/review/extentions/array.rb', line 5

def to_doc
  self.map(&:to_doc).join("")
end

#to_rawObject

for ReVIEW::Node



11
12
13
# File 'lib/review/extentions/array.rb', line 11

def to_raw
  self.map(&:to_raw).join("")
end