Module: CanTango::Api::Account

Defined in:
lib/cantango/api/account.rb

Class Method Summary collapse

Class Method Details

.apisObject


9
10
11
# File 'lib/cantango/api/account.rb', line 9

def self.apis
  [:ability, :can, :scope, :session]
end

.clazz(api) ⇒ Object


13
14
15
# File 'lib/cantango/api/account.rb', line 13

def self.clazz api
  "CanTango::Api::#{api.to_s.camelize}::Account".constantize
end

.included(base) ⇒ Object


3
4
5
6
7
# File 'lib/cantango/api/account.rb', line 3

def self.included base
  apis.each do |api|
    base.send :include, clazz(api)
  end
end