Class: Gitt::Models::Person
- Inherits:
-
Data
- Object
- Data
- Gitt::Models::Person
- Defined in:
- lib/gitt/models/person.rb
Overview
Represents a person within a repository.
Instance Attribute Summary collapse
-
#delimiter ⇒ Object
readonly
Returns the value of attribute delimiter.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name: nil, delimiter: " ", email: nil) ⇒ Person
constructor
A new instance of Person.
- #to_s ⇒ Object
Constructor Details
#initialize(name: nil, delimiter: " ", email: nil) ⇒ Person
Returns a new instance of Person.
11 12 13 |
# File 'lib/gitt/models/person.rb', line 11 def initialize name: nil, delimiter: " ", email: nil super end |
Instance Attribute Details
#delimiter ⇒ Object (readonly)
Returns the value of attribute delimiter
8 9 10 |
# File 'lib/gitt/models/person.rb', line 8 def delimiter @delimiter end |
#email ⇒ Object (readonly)
Returns the value of attribute email
8 9 10 |
# File 'lib/gitt/models/person.rb', line 8 def email @email end |
#name ⇒ Object (readonly)
Returns the value of attribute name
8 9 10 |
# File 'lib/gitt/models/person.rb', line 8 def name @name end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/gitt/models/person.rb', line 15 def to_s case self in String, String, String then "#{name}#{delimiter}<#{email}>" in String, String, nil then name in nil, String, String then "<#{email}>" else Core::EMPTY_STRING end end |