thirteen_f 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/thirteen_f/company.rb +5 -2
- data/lib/thirteen_f/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 723633835bbcf3afba710931240c94ddd6683274be9b465f10061e4af7158a3e
|
|
4
|
+
data.tar.gz: e31c7cf1f0f7fad8ce2cb48d5db87b63e9773d8670a8b52b6f0df1f2b96e9a88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ceebea3dc069849b4c53c5a4924bb5360fcdad14e4f2aae52face8839af9760f24750416d3ffc5457ca7723196c0da3ca5266f8ce372dd2bbd650744c7c17cf4
|
|
7
|
+
data.tar.gz: 2f0fe8d79ad99e6143d09b327f5faaa700f7e553c96a7aeb84963eb236f427373b0e64230b82ab939d826cc4fa6e2e24bde6e1d5deebdd1975b0fa51e2a46c5d
|
data/lib/thirteen_f/company.rb
CHANGED
|
@@ -31,7 +31,7 @@ class ThirteenF
|
|
|
31
31
|
response = HTTP.get sec_url_from_cik(cik)
|
|
32
32
|
return false unless response.status == 200
|
|
33
33
|
page = Nokogiri::HTML response.to_s
|
|
34
|
-
from_company_page
|
|
34
|
+
from_company_page(page).first
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def initialize(cik, name, state_or_country)
|
|
@@ -43,12 +43,15 @@ class ThirteenF
|
|
|
43
43
|
|
|
44
44
|
def get_most_recent_holdings
|
|
45
45
|
get_filings unless filings
|
|
46
|
-
most_recent_filing = filings.select(&:period_of_report).max_by(&:period_of_report)
|
|
47
46
|
most_recent_filing.get_positions
|
|
48
47
|
@most_recent_holdings = most_recent_filing.positions
|
|
49
48
|
true
|
|
50
49
|
end
|
|
51
50
|
|
|
51
|
+
def most_recent_filing
|
|
52
|
+
filings.select(&:period_of_report).max_by(&:period_of_report)
|
|
53
|
+
end
|
|
54
|
+
|
|
52
55
|
def get_filings(count: 10)
|
|
53
56
|
@filings = Filing.from_index_urls thirteen_f_urls(count: count), self
|
|
54
57
|
true
|
data/lib/thirteen_f/version.rb
CHANGED