Class: WorkItems::Widgets::Base
- Inherits:
-
Object
- Object
- WorkItems::Widgets::Base
show all
- Defined in:
- app/models/work_items/widgets/base.rb
Direct Known Subclasses
Assignees, AwardEmoji, CurrentUserTodos, Description, Hierarchy, Labels, LinkedItems, Milestone, Notes, Notifications, StartAndDueDate
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(work_item) ⇒ Base
Returns a new instance of Base.
36
37
38
|
# File 'app/models/work_items/widgets/base.rb', line 36
def initialize(work_item)
@work_item = work_item
end
|
Instance Attribute Details
#work_item ⇒ Object
Returns the value of attribute work_item.
40
41
42
|
# File 'app/models/work_items/widgets/base.rb', line 40
def work_item
@work_item
end
|
Class Method Details
.api_symbol ⇒ Object
10
11
12
|
# File 'app/models/work_items/widgets/base.rb', line 10
def self.api_symbol
"#{type}_widget".to_sym
end
|
.callback_class ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'app/models/work_items/widgets/base.rb', line 22
def self.callback_class
WorkItems::Callbacks.const_get(name.demodulize, false)
rescue NameError
begin
Issuable::Callbacks.const_get(name.demodulize, false)
rescue NameError
nil
end
end
|
.process_quick_action_param(param_name, value) ⇒ Object
18
19
20
|
# File 'app/models/work_items/widgets/base.rb', line 18
def self.process_quick_action_param(param_name, value)
{ param_name => value }
end
|
.quick_action_commands ⇒ Object
14
15
16
|
# File 'app/models/work_items/widgets/base.rb', line 14
def self.quick_action_commands
[]
end
|
.type ⇒ Object
6
7
8
|
# File 'app/models/work_items/widgets/base.rb', line 6
def self.type
name.demodulize.underscore.to_sym
end
|
Instance Method Details
#type ⇒ Object
32
33
34
|
# File 'app/models/work_items/widgets/base.rb', line 32
def type
self.class.type
end
|