Class: Lobbyliste::List
Overview
This class represents an instance of the parsed lobbylist.
Instance Attribute Summary collapse
-
#abbreviations ⇒ Hash
readonly
Keys are the abbreviations, values are Arrays of organisation ids.
-
#last_update ⇒ Date
readonly
The date when the document was last updated.
-
#organisations ⇒ Array
readonly
List of organisations.
-
#tags ⇒ Hash
readonly
Keys are the tags, values are Arrays of organisation ids.
Instance Method Summary collapse
-
#initialize(organisations, tags, abbreviations, last_update) ⇒ List
constructor
A new instance of List.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(organisations, tags, abbreviations, last_update) ⇒ List
Returns a new instance of List.
18 19 20 21 22 23 |
# File 'lib/lobbyliste/list.rb', line 18 def initialize(organisations, , abbreviations, last_update) @organisations = organisations @tags= @abbreviations = abbreviations @last_update = last_update end |
Instance Attribute Details
#abbreviations ⇒ Hash (readonly)
Returns keys are the abbreviations, values are Arrays of organisation ids.
13 14 15 |
# File 'lib/lobbyliste/list.rb', line 13 def abbreviations @abbreviations end |
#last_update ⇒ Date (readonly)
Returns the date when the document was last updated.
16 17 18 |
# File 'lib/lobbyliste/list.rb', line 16 def last_update @last_update end |
#organisations ⇒ Array (readonly)
Returns list of organisations.
7 8 9 |
# File 'lib/lobbyliste/list.rb', line 7 def organisations @organisations end |
#tags ⇒ Hash (readonly)
Returns keys are the tags, values are Arrays of organisation ids.
10 11 12 |
# File 'lib/lobbyliste/list.rb', line 10 def @tags end |
Instance Method Details
#to_json(*a) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/lobbyliste/list.rb', line 25 def to_json(*a) { organisations: organisations, tags: , abbreviations: abbreviations, last_update: last_update }.to_json(*a) end |