Class: ECFS::Proceeding

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

Defined Under Namespace

Classes: ResultSet

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Proceeding

Returns a new instance of Proceeding.



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

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

Class Method Details

.find(docket_number) ⇒ Object



16
17
18
19
20
# File 'lib/ecfs/proceeding.rb', line 16

def self.find(docket_number)
  query.tap do |q|
    q.eq("docket_number", docket_number)
  end.get.merge!({"docket_number" => docket_number})
end

.queryObject



12
13
14
# File 'lib/ecfs/proceeding.rb', line 12

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

Instance Method Details

#fetch_filings!Object



28
29
30
31
32
33
34
35
# File 'lib/ecfs/proceeding.rb', line 28

def fetch_filings!
  filings = ECFS::Filing.query.tap do |q|
    q.docket_number = self["docket_number"]
  end.get
  merge!({"filings" => filings})

  self
end

#fetch_info!Object



22
23
24
25
26
# File 'lib/ecfs/proceeding.rb', line 22

def fetch_info!
  merge!(ECFS::Proceeding.find(self["docket_number"]))

  self
end