Class: SecEdgar::PollFiling
- Inherits:
-
Struct
- Object
- Struct
- SecEdgar::PollFiling
- Defined in:
- lib/sec_edgar/poll.rb
Instance Attribute Summary collapse
-
#cik ⇒ Object
Returns the value of attribute cik.
-
#client ⇒ Object
Returns the value of attribute client.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#date_str ⇒ Object
Returns the value of attribute date_str.
-
#file_id ⇒ Object
Returns the value of attribute file_id.
-
#ftp_link ⇒ Object
Returns the value of attribute ftp_link.
-
#term ⇒ Object
Returns the value of attribute term.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#cik ⇒ Object
Returns the value of attribute cik
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def cik @cik end |
#client ⇒ Object
Returns the value of attribute client
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def client @client end |
#company_name ⇒ Object
Returns the value of attribute company_name
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def company_name @company_name end |
#date_str ⇒ Object
Returns the value of attribute date_str
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def date_str @date_str end |
#file_id ⇒ Object
Returns the value of attribute file_id
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def file_id @file_id end |
#ftp_link ⇒ Object
Returns the value of attribute ftp_link
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def ftp_link @ftp_link end |
#term ⇒ Object
Returns the value of attribute term
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def term @term end |
#title ⇒ Object
Returns the value of attribute title
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def title @title end |
#type ⇒ Object
Returns the value of attribute type
4 5 6 |
# File 'lib/sec_edgar/poll.rb', line 4 def type @type end |
Instance Method Details
#content(&error_blk) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/sec_edgar/poll.rb', line 22 def content(&error_blk) @content ||= client.fetch(ftp_link, nil) rescue RestClient::ResourceNotFound => e puts "404 Resource Not Found: Bad link #{ self.link }" if block_given? error_blk.call(e, self) else raise e end end |
#date ⇒ Object
14 15 16 |
# File 'lib/sec_edgar/poll.rb', line 14 def date Date.parse(date_str) end |
#link ⇒ Object
18 19 20 |
# File 'lib/sec_edgar/poll.rb', line 18 def link "http://www.sec.gov/Archives/#{ ftp_link }" end |