Module: CanTango::Api::User
- Defined in:
- lib/cantango/api/user.rb
Class Method Summary collapse
Class Method Details
.apis ⇒ Object
9 10 11 |
# File 'lib/cantango/api/user.rb', line 9 def self.apis [:ability, :can, :scope, :session] end |
.clazz(api) ⇒ Object
13 14 15 |
# File 'lib/cantango/api/user.rb', line 13 def self.clazz api "CanTango::Api::#{api.to_s.camelize}::User".constantize end |
.included(base) ⇒ Object
3 4 5 6 7 |
# File 'lib/cantango/api/user.rb', line 3 def self.included base apis.each do |api| base.send :include, clazz(api) end end |