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