Class: Udb::Person
- Inherits:
-
Object
- Object
- Udb::Person
- Extended by:
- T::Sig
- Includes:
- Comparable
- Defined in:
- lib/udb/obj/database_obj.rb
Overview
Personal information about a contributor
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #company ⇒ Object
- #email ⇒ Object
-
#initialize(data) ⇒ Person
constructor
A new instance of Person.
- #name ⇒ Object
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 |
#company ⇒ Object
538 |
# File 'lib/udb/obj/database_obj.rb', line 538 def company = @data["company"] |
#email ⇒ Object
533 |
# File 'lib/udb/obj/database_obj.rb', line 533 def email = @data["email"] |
#name ⇒ Object
528 |
# File 'lib/udb/obj/database_obj.rb', line 528 def name = T.must(@data["name"]) |