Class: FederalRegister::Facet

Inherits:
Base show all
Extended by:
Utilities
Defined in:
lib/federal_register/facet.rb

Defined Under Namespace

Classes: Agency, Document, PresidentialDocumentType, PublicInspectionDocument, PublicInspectionIssue, Topic

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

add_attribute, #fetch_full, #full?, override_base_uri

Methods inherited from Client

get

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ Facet

Returns a new instance of Facet.



16
17
18
19
20
# File 'lib/federal_register/facet.rb', line 16

def initialize(attributes={}, options={})
  @result_set = options.delete(:result_set)

  super(attributes, options)
end

Instance Attribute Details

#result_setObject (readonly)

Returns the value of attribute result_set.



4
5
6
# File 'lib/federal_register/facet.rb', line 4

def result_set
  @result_set
end

Class Method Details

.search(args = {}) ⇒ Object



10
11
12
13
14
# File 'lib/federal_register/facet.rb', line 10

def self.search(args={})
  FederalRegister::FacetResultSet.fetch(
    url, :query => args, :result_class => self
  )
end