Class: IRXML::Edgar::List

Inherits:
Object
  • Object
show all
Defined in:
lib/irxml/edgar.rb

Instance Method Summary collapse

Constructor Details

#initializeList

Returns a new instance of List.



4
5
6
7
# File 'lib/irxml/edgar.rb', line 4

def initialize
  get
  set_values
end

Instance Method Details

#documentsObject



13
14
15
# File 'lib/irxml/edgar.rb', line 13

def documents
  @documents ||= []
end

#getObject



9
10
11
# File 'lib/irxml/edgar.rb', line 9

def get
  @data = IRXML.get('EdgarRTList', {'Version' => 2, 'OUTPUT' => 'xml'})
end

#set_valuesObject



17
18
19
20
21
# File 'lib/irxml/edgar.rb', line 17

def set_values
  @data.css('ROW').each do |node|
    documents << IRXML::Edgar::Document.new(node)
  end
end