Class: Lazylead::ComponentCC
- Inherits:
-
PredefinedCC
- Object
- PredefinedCC
- Lazylead::ComponentCC
- Defined in:
- lib/lazylead/cc.rb
Overview
CC addresses based on Jira component owners for email notification. Allows to detect the CC for particular ticket based on its component.
- Author
-
Yurii Dubinka ([email protected])
- Copyright
-
Copyright © 2019-2020 Yurii Dubinka
- License
-
MIT
Instance Method Summary collapse
-
#initialize(prj, jira) ⇒ ComponentCC
constructor
A new instance of ComponentCC.
- #to_h ⇒ Object
Methods inherited from PredefinedCC
Constructor Details
#initialize(prj, jira) ⇒ ComponentCC
Returns a new instance of ComponentCC.
143 144 145 146 147 |
# File 'lib/lazylead/cc.rb', line 143 def initialize(prj, jira) super({}) @prj = prj @jira = jira end |
Instance Method Details
#to_h ⇒ Object
149 150 151 152 153 154 155 |
# File 'lib/lazylead/cc.rb', line 149 def to_h @to_h ||= components.each_with_object({}) do |c, h| email = lead(c.attrs["id"]) next if email.nil? || email.blank? h[c.attrs["name"]] = email end end |