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.



45
46
47
48
# File 'lib/reviewable/actions.rb', line 45

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.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def button_class
  @button_class
end

#client_actionObject

Returns the value of attribute client_action.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def client_action
  @client_action
end

#confirm_messageObject

Returns the value of attribute confirm_message.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def confirm_message
  @confirm_message
end

#custom_modalObject

Returns the value of attribute custom_modal.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def custom_modal
  @custom_modal
end

#descriptionObject

Returns the value of attribute description.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def description
  @description
end

#iconObject

Returns the value of attribute icon.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def icon
  @icon
end

#labelObject

Returns the value of attribute label.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def label
  @label
end

#require_reject_reasonObject

Returns the value of attribute require_reject_reason.



36
37
38
# File 'lib/reviewable/actions.rb', line 36

def require_reject_reason
  @require_reject_reason
end

Instance Method Details

#server_actionObject



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

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