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) ⇒ Integer?
- #company ⇒ nil, String
- #email ⇒ nil, String
- #initialize(data) constructor
-
#name ⇒ String
Person's name.
Constructor Details
#initialize(data)
541 542 543 |
# File 'lib/udb/obj/database_obj.rb', line 541 def initialize(data) @data = data end |
Instance Method Details
#<=>(other) ⇒ Integer?
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 ⇒ nil, String
538 |
# File 'lib/udb/obj/database_obj.rb', line 538 def company = @data["company"] |
#email ⇒ nil, String
533 |
# File 'lib/udb/obj/database_obj.rb', line 533 def email = @data["email"] |
#name ⇒ String
Returns Person's name.
528 |
# File 'lib/udb/obj/database_obj.rb', line 528 def name = T.must(@data["name"]) |