Class: Ecfr::SearchService::Timeline::Entry

Inherits:
Base
  • Object
show all
Includes:
AttributeMethodDefinition
Defined in:
lib/ecfr/search_service/timeline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributeMethodDefinition

included

Methods inherited from Base

base_url, service_name, service_path

Constructor Details

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

Returns a new instance of Entry.



9
10
11
12
13
14
# File 'lib/ecfr/search_service/timeline.rb', line 9

def initialize(attributes = {}, options = {})
  date, attributes, _ = attributes
  attributes["date"] = date
  attributes["change_types"].compact!
  super
end

Instance Attribute Details

#change_types[:symbol] (readonly)

Returns:

  • ([:symbol])


16
# File 'lib/ecfr/search_service/timeline.rb', line 16

attribute :change_types, type: Array(:symbol)

#countInteger (readonly)

Returns:

  • (Integer)


17
# File 'lib/ecfr/search_service/timeline.rb', line 17

attribute :count, type: :integer

#dateDate (readonly)

Returns:

  • (Date)


18
# File 'lib/ecfr/search_service/timeline.rb', line 18

attribute :date, type: :date, as: :key