Sha256: 96ccd7f1537459ae21b00b15ce61890d242fe713320d2827b27bf5bc78afc1dd

Contents?: true

Size: 677 Bytes

Versions: 17

Compression:

Stored size: 677 Bytes

Contents

module BentoSearch
  class Author
    def initialize(args ={})
      args.each_pair do |key, value|
        send("#{key}=", value)
      end
    end
    
    # Can be first name or initial, whatever source provides
    attr_accessor :first
    # last name/surname/family name as provided by source
    attr_accessor :last
    # middle name or initial, as and if provided by source
    attr_accessor :middle
    
    # if source doens't provide seperate first/last, 
    # source may only be able to provide one big string, author_display
    attr_accessor :display
    
    def empty?
      first.blank? && last.blank? && middle.blank? && display.blank?
    end
    
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
bento_search-1.3.0 app/models/bento_search/author.rb
bento_search-1.2.2 app/models/bento_search/author.rb
bento_search-1.2.1 app/models/bento_search/author.rb
bento_search-1.2.0 app/models/bento_search/author.rb
bento_search-1.1.0 app/models/bento_search/author.rb
bento_search-1.0.6 app/models/bento_search/author.rb
bento_search-1.0.4 app/models/bento_search/author.rb
bento_search-1.0.3 app/models/bento_search/author.rb
bento_search-1.0.2 app/models/bento_search/author.rb
bento_search-1.0.1 app/models/bento_search/author.rb
bento_search-1.0.0 app/models/bento_search/author.rb
bento_search-0.9.0 app/models/bento_search/author.rb
bento_search-0.8.0 app/models/bento_search/author.rb
bento_search-0.7.0 app/models/bento_search/author.rb
bento_search-0.6.0 app/models/bento_search/author.rb
bento_search-0.5.0 app/models/bento_search/author.rb
bento_search-0.0.1 app/models/bento_search/author.rb