Module: Enumerable

Defined in:
lib/wgit/core_ext.rb

Overview

Extend the standard Enumerable functionality.

Instance Method Summary collapse

Instance Method Details

#to_urlsArray<Wgit::Url>

Converts each String instance into a Wgit::Url object and returns the new Array.

Returns:

  • (Array<Wgit::Url>)

    The converted URL's.



24
25
26
# File 'lib/wgit/core_ext.rb', line 24

def to_urls
  map { |element| process_url_element(element) }
end

#to_urls!Array<Wgit::Url>

Converts each String instance into a Wgit::Url object and returns self having modified the receiver.

Returns:

  • (Array<Wgit::Url>)

    Self containing the converted URL's.



32
33
34
# File 'lib/wgit/core_ext.rb', line 32

def to_urls!
  map! { |element| process_url_element(element) }
end