Class: FederalRegister::PublicInspectionDocument

Inherits:
Base
  • Object
show all
Extended by:
DocumentUtilities, Utilities
Defined in:
lib/federal_register/public_inspection_document.rb

Constant Summary

Constants included from DocumentUtilities

DocumentUtilities::URL_CHARACTER_LIMIT

Constants inherited from Base

Base::INTEGER_CLASS

Instance Attribute Summary

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DocumentUtilities

find_all

Methods inherited from Base

add_attribute, #fetch_full, #full?, #initialize, override_base_uri

Methods inherited from Client

get

Constructor Details

This class inherits a constructor from FederalRegister::Base

Class Method Details

.available_on(date) ⇒ Object



39
40
41
# File 'lib/federal_register/public_inspection_document.rb', line 39

def self.available_on(date)
  FederalRegister::PublicInspectionIssueResultSet.fetch("/public-inspection-documents.json", :query => {:conditions => {:available_on => date}}, :result_class => self)
end

.currentObject



43
44
45
# File 'lib/federal_register/public_inspection_document.rb', line 43

def self.current
  FederalRegister::PublicInspectionIssueResultSet.fetch("/public-inspection-documents/current.json", :result_class => self)
end

.find(document_number) ⇒ Object



34
35
36
37
# File 'lib/federal_register/public_inspection_document.rb', line 34

def self.find(document_number)
  attributes = get("/public-inspection-documents/#{document_number}.json").parsed_response
  new(attributes, :full => true)
end

.find_all_base_pathObject



47
48
49
# File 'lib/federal_register/public_inspection_document.rb', line 47

def self.find_all_base_path
  '/public-inspection-documents'
end

.search(args) ⇒ Object



26
27
28
# File 'lib/federal_register/public_inspection_document.rb', line 26

def self.search(args)
  FederalRegister::ResultSet.fetch("/public-inspection-documents.json", :query => args, :result_class => self)
end

.search_metadata(args) ⇒ Object



30
31
32
# File 'lib/federal_register/public_inspection_document.rb', line 30

def self.(args)
  FederalRegister::ResultSet.fetch("/public-inspection-documents.json", :query => args.merge(:metadata_only => '1'), :result_class => self)
end

Instance Method Details

#agenciesObject



51
52
53
54
55
# File 'lib/federal_register/public_inspection_document.rb', line 51

def agencies
  attributes["agencies"].map do |attr|
    FederalRegister::Agency.new(attr)
  end
end