Class: Reviewable::Actions::Action

Inherits:
Item
  • Object
show all
Defined in:
lib/reviewable/actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, icon = nil, button_class = nil, label = nil) ⇒ Action

Returns a new instance of Action.



49
50
51
52
# File 'lib/reviewable/actions.rb', line 49

def initialize(id, icon = nil, button_class = nil, label = nil)
  super(id)
  @icon, @button_class, @label = icon, button_class, label
end

Instance Attribute Details

#button_classObject

Returns the value of attribute button_class.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def button_class
  @button_class
end

#client_actionObject

Returns the value of attribute client_action.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def client_action
  @client_action
end

#confirm_messageObject

Returns the value of attribute confirm_message.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def confirm_message
  @confirm_message
end

#custom_modalObject

Returns the value of attribute custom_modal.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def custom_modal
  @custom_modal
end

#descriptionObject

Returns the value of attribute description.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def description
  @description
end

#iconObject

Returns the value of attribute icon.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def icon
  @icon
end

#labelObject

Returns the value of attribute label.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def label
  @label
end

#require_reject_reasonObject

Returns the value of attribute require_reject_reason.



40
41
42
# File 'lib/reviewable/actions.rb', line 40

def require_reject_reason
  @require_reject_reason
end

Instance Method Details

#server_actionObject



54
55
56
# File 'lib/reviewable/actions.rb', line 54

def server_action
  id.split("-").last
end