Class: FederalRegister::Facet::PublicInspectionIssue
- Defined in:
- lib/federal_register/facet/public_inspection_issue.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Daily, DailyFiling, Type, TypeFiling
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes, options = {}) ⇒ PublicInspectionIssue
constructor
A new instance of PublicInspectionIssue.
- #regular_filings ⇒ Object
- #special_filings ⇒ Object
Methods inherited from Base
add_attribute, #fetch_full, #full?, override_base_uri
Methods inherited from Client
Constructor Details
#initialize(attributes, options = {}) ⇒ PublicInspectionIssue
Returns a new instance of PublicInspectionIssue.
5 6 7 8 |
# File 'lib/federal_register/facet/public_inspection_issue.rb', line 5 def initialize(attributes, = {}) @conditions = [:query] || {} super end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
3 4 5 |
# File 'lib/federal_register/facet/public_inspection_issue.rb', line 3 def conditions @conditions end |
Class Method Details
.search(args = {}) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/federal_register/facet/public_inspection_issue.rb', line 28 def self.search(args={}) response = get(url, query: args).parsed_response response.map do |slug, attributes| attributes['slug'] = slug new(attributes, query: args) end end |
Instance Method Details
#regular_filings ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/federal_register/facet/public_inspection_issue.rb', line 19 def regular_filings @regular_filings ||= filing_class.new( attributes['regular_filings'], conditions.deep_merge({ conditions: {special_filing: 0} }) ) end |
#special_filings ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/federal_register/facet/public_inspection_issue.rb', line 10 def special_filings @special_filings ||= filing_class.new( attributes['special_filings'], conditions.deep_merge({ conditions: {special_filing: 1} }) ) end |