Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/textminer/link_methods_array.rb,
lib/textminer/link_methods_array.rb,
lib/textminer/link_methods_array.rb,
lib/textminer/link_methods_array.rb

Overview

Array methods

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
8
9
10
11
12
# File 'lib/textminer/link_methods_array.rb', line 3

def links(just_urls = true)
  return self.collect{ |x| x.links(just_urls) }.flatten
  # if temp.length == 1
  #   return tmp[0]
  # else
  #   return tmp
  # end
  # tmp = self.collect{ |x| x['message']['link'] }
  # return parse_link(tmp, just_urls)
end


24
25
26
27
28
# File 'lib/textminer/link_methods_array.rb', line 24

def links_pdf(just_urls = true)
  self.collect { |z| z.links_pdf(just_urls) }[0]
  # return parse_link(self.collect { |z| z.links_pdf }[0], just_urls)
  # return parse_link(pull_link(self, '^application\/pdf$'), just_urls)
end


32
33
34
35
36
# File 'lib/textminer/link_methods_array.rb', line 32

def links_plain(just_urls = true)
  self.collect { |z| z.links_plain(just_urls) }[0]
  # return parse_link(self.collect { |z| z.links_plain }[0], just_urls)
  # return parse_link(pull_link(self, '^application\/plain$|^text\/plain$'), just_urls)
end


16
17
18
19
20
# File 'lib/textminer/link_methods_array.rb', line 16

def links_xml(just_urls = true)
  self.collect { |z| z.links_xml(just_urls) }[0]
  # return parse_link(self.collect { |z| z.links_xml }[0], just_urls)
  # return parse_link(pull_link(self, '^application\/xml$|^text\/xml$'), just_urls)
end