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)
526 527 528 |
# File 'lib/udb/obj/database_obj.rb', line 526 def initialize(data) @data = data end |
Instance Method Details
#<=>(other) ⇒ Integer?
531 532 533 534 535 |
# File 'lib/udb/obj/database_obj.rb', line 531 def <=>(other) return nil unless other.is_a?(Person) name <=> other.name end |
#company ⇒ nil, String
523 |
# File 'lib/udb/obj/database_obj.rb', line 523 def company = @data["company"] |
#email ⇒ nil, String
518 |
# File 'lib/udb/obj/database_obj.rb', line 518 def email = @data["email"] |
#name ⇒ String
Returns Person’s name.
513 |
# File 'lib/udb/obj/database_obj.rb', line 513 def name = T.must(@data["name"]) |