Module: Canable::Cans

Defined in:
lib/canable/canable.rb,
lib/canable/cans.rb

Overview

Module that holds all the can_action? methods.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
# File 'lib/canable/cans.rb', line 3

def self.included(base)
  class << base
    include ClassMethods
  end
end

Instance Method Details

#run_callback(name, options) ⇒ Object



9
10
11
12
# File 'lib/canable/cans.rb', line 9

def run_callback(name, options)
  cs = self.class.canable_callbacks
  self.send(cs[name], options) if cs[name]
end