Class: ECFS::Filing

Inherits:
Hash
  • Object
show all
Defined in:
lib/ecfs/filing.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Filing

Returns a new instance of Filing.



10
11
12
# File 'lib/ecfs/filing.rb', line 10

def initialize(params={})
  self.merge!(params)
end

Instance Attribute Details

#documentsObject (readonly)

Returns the value of attribute documents.



8
9
10
# File 'lib/ecfs/filing.rb', line 8

def documents
  @documents
end

Class Method Details

.queryObject



25
26
27
# File 'lib/ecfs/filing.rb', line 25

def self.query
  ECFS::FilingsQuery.new(:typecast_results => true)
end

Instance Method Details

#fetch_documents!Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/ecfs/filing.rb', line 14

def fetch_documents!
  @documents = self["document_urls"].map do |url|
    ECFS::Document.new({
      "url" => url,
      "filing" => self
    })
  end

  self
end