class EntityActionController
Attributes
actions[RW]
entity[RW]
id[RW]
Public Class Methods
new(entity, id = nil)
click to toggle source
# File lib/rbbt/rest/entity/action_controller.rb, line 5 def initialize(entity, id = nil) @entity, @id = entity, id @actions = [] end
Public Instance Methods
add(action, text = nil, resource = nil, params = {})
click to toggle source
# File lib/rbbt/rest/entity/action_controller.rb, line 10 def add(action, text = nil, resource = nil, params = {}) text = action if text.nil? resource = action.respond_to?(:resource) ? action.resource : nil resource ||= "Rbbt" @actions << [action, text, resource, params] end