Method: Pollex::Source.all

Defined in:
lib/pollex/source.rb

.allArray<Source>

Returns all Sources in Pollex.

Returns:

  • (Array<Source>)

    array of Sources in Pollex



124
125
126
127
128
129
130
131
132
# File 'lib/pollex/source.rb', line 124

def self.all
  @sources ||= Scraper.instance.get_all(Source, "/source/", [
    [:code, 'td[1]/a/text()'],
    [:path, 'td[1]/a/@href'],
    [:name, 'td[2]/a/text()'],
    [:count, 'td[3]/text()'],
    [:reference, 'td[4]/text()']
  ])
end