A basic reference object.
These attributes are set automatically on new()
String. Some specific page(s) of note.
String. The full text of the citation, as read from input or assigned, not computed from individual components.
String
String. Anything that doesn’t fit in a page range.
String
String
String
String
String
String
If :author_year is passed it is broken down into People + year.
# File lib/models/ref.rb, line 50 def initialize(options = {}) opts = { }.merge!(options) @parent = nil build(ATTRIBUTES, opts) @authors = [] if @authors.nil? raise Taxonifi::RefError, 'If :author_year is provided then authors and year must not be.' if opts[:author_year] && (!opts[:year].nil? || !opts[:authors].nil?) add_author_year(opts[:author_year]) if !opts[:author_year].nil? && opts[:author_year].size > 0 true end
Returns a pipe delimited representation of the reference.
# File lib/models/ref.rb, line 68 def compact_string s = [authors.collect{|a| a.compact_string}.join, year, self.title, publication, volume, number, pages, pg_start, pg_end, cited_page].join("|").downcase.gsub(%r\s/, '') s end