Class: Jirify::Models::TransitionList
- Defined in:
- lib/jirify/models/transition_list.rb
Instance Attribute Summary
Attributes inherited from BaseList
Class Method Summary collapse
Instance Method Summary collapse
- #find_by_name(name) ⇒ Object
-
#initialize(list) ⇒ TransitionList
constructor
A new instance of TransitionList.
- #names ⇒ Object
Methods inherited from BaseList
Methods inherited from Base
client, #method_missing, #respond_to_missing?
Constructor Details
#initialize(list) ⇒ TransitionList
Returns a new instance of TransitionList.
4 5 6 |
# File 'lib/jirify/models/transition_list.rb', line 4 def initialize(list) @list = list.map { |transition| Transition.new transition } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Jirify::Models::Base
Class Method Details
.all(issue) ⇒ Object
23 24 25 |
# File 'lib/jirify/models/transition_list.rb', line 23 def all(issue) TransitionList.new client.Transition.all(issue: issue) end |
Instance Method Details
#find_by_name(name) ⇒ Object
8 9 10 |
# File 'lib/jirify/models/transition_list.rb', line 8 def find_by_name(name) find { |transition| transition.name == name } end |
#names ⇒ Object
12 13 14 |
# File 'lib/jirify/models/transition_list.rb', line 12 def names map(&:name) end |