Class: Ecfr::SearchService::Timeline::Entry
Instance Attribute Summary collapse
Instance Method Summary
collapse
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]
16
|
# File 'lib/ecfr/search_service/timeline.rb', line 16
attribute :change_types, type: Array(:symbol)
|
#count ⇒ Integer
17
|
# File 'lib/ecfr/search_service/timeline.rb', line 17
attribute :count, type: :integer
|
#date ⇒ Date
18
|
# File 'lib/ecfr/search_service/timeline.rb', line 18
attribute :date, type: :date, as: :key
|