Class: Udb::Person

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Comparable
Defined in:
lib/udb/obj/database_obj.rb

Overview

Personal information about a contributor

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Person

Returns a new instance of Person.



541
542
543
# File 'lib/udb/obj/database_obj.rb', line 541

def initialize(data)
  @data = data
end

Instance Method Details

#<=>(other) ⇒ Object



546
547
548
549
550
# File 'lib/udb/obj/database_obj.rb', line 546

def <=>(other)
  return nil unless other.is_a?(Person)

  name <=> other.name
end

#companyObject



538
# File 'lib/udb/obj/database_obj.rb', line 538

def company = @data["company"]

#emailObject



533
# File 'lib/udb/obj/database_obj.rb', line 533

def email = @data["email"]

#nameObject



528
# File 'lib/udb/obj/database_obj.rb', line 528

def name = T.must(@data["name"])