Class: Edgar::FilingSections
- Inherits:
-
Object
- Object
- Edgar::FilingSections
- Defined in:
- lib/edgar/filing_sections.rb
Overview
Extracts section markers (Item 1, Item 1A, etc.) from filing text.
Constant Summary collapse
- SECTION_MARKERS =
{ "1" => "Business", "1A" => "Risk Factors", "1B" => "Unresolved Staff Comments", "2" => "Properties", "3" => "Legal Proceedings", "4" => "Mine Safety Disclosures", "5" => "Market for Registrant's Common Equity", "6" => "Selected Financial Data", "7" => "Management's Discussion and Analysis", "7A" => "Quantitative and Qualitative Disclosures About Market Risk", "8" => "Financial Statements and Supplementary Data", "9" => "Changes in and Disagreements with Accountants", "9A" => "Controls and Procedures", "9B" => "Other Information", "10" => "Directors and Executive Officers", "11" => "Executive Compensation", "12" => "Security Ownership of Certain Beneficial Owners", "13" => "Certain Relationships and Related Transactions", "14" => "Principal Accountant Fees and Services", "15" => "Exhibits and Financial Statement Schedules" }.freeze
Class Method Summary collapse
Class Method Details
.extract_sections(sgml_text) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/edgar/filing_sections.rb', line 29 def self.extract_sections(sgml_text) markers = {} sgml_text.to_s.each_line do |line| next unless line.strip =~ /^Item\s+(\d+[A-Za-z]?)\.?\s+(.+)/i markers[::Regexp.last_match(1)] = ::Regexp.last_match(2).strip end markers end |
.find_sections(sgml_text, **_unused) ⇒ Object
39 40 41 |
# File 'lib/edgar/filing_sections.rb', line 39 def self.find_sections(sgml_text, **_unused) extract_sections(sgml_text) end |