Class: Lazylead::User
- Inherits:
-
Object
- Object
- Lazylead::User
- Defined in:
- lib/lazylead/system/jira.rb
Overview
An user from Jira which might be reporter, assignee, etc.
- Author
-
Yurii Dubinka ([email protected])
- Copyright
-
Copyright © 2019-2020 Yurii Dubinka
- License
-
MIT
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #email ⇒ Object
- #hash ⇒ Object
- #id ⇒ Object
-
#initialize(usr) ⇒ User
constructor
A new instance of User.
- #inspect ⇒ Object
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(usr) ⇒ User
Returns a new instance of User.
93 94 95 |
# File 'lib/lazylead/system/jira.rb', line 93 def initialize(usr) @usr = usr end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
109 110 111 112 113 114 115 |
# File 'lib/lazylead/system/jira.rb', line 109 def ==(other) if other.respond_to?(:id) other.id == id else false end end |
#email ⇒ Object
105 106 107 |
# File 'lib/lazylead/system/jira.rb', line 105 def email @usr["emailAddress"] end |
#hash ⇒ Object
119 120 121 |
# File 'lib/lazylead/system/jira.rb', line 119 def hash id.hash end |
#id ⇒ Object
97 98 99 |
# File 'lib/lazylead/system/jira.rb', line 97 def id @usr["name"] end |
#inspect ⇒ Object
127 128 129 |
# File 'lib/lazylead/system/jira.rb', line 127 def inspect "#{@opts['site']} (#{@opts['username']})" end |
#name ⇒ Object
101 102 103 |
# File 'lib/lazylead/system/jira.rb', line 101 def name @usr["displayName"] end |
#to_s ⇒ Object
123 124 125 |
# File 'lib/lazylead/system/jira.rb', line 123 def to_s inspect end |