A class to aggregate People and Year combinations.
The parens attribute reflects that this combinations was cited in parentheses.
Array of Taxonifi::Model::People
String
# File lib/models/author_year.rb, line 15 def initialize(options = {}) opts = { :people => [], :parens => false, :year => nil }.merge!(options) @parens = opts[:parens] @people = opts[:people] @year = opts[:year] end
Return a string representing all data, used in indexing.
# File lib/models/author_year.rb, line 28 def compact_index index = [@year] @people.each do |a| index.push a.compact_string end index.join("-") end