Sha256: 6da90c06ed9bba36dd92def6b76a2d0eb1927d55c9ab303ebee9a5885f846a68

Contents?: true

Size: 323 Bytes

Versions: 4

Compression:

Stored size: 323 Bytes

Contents

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cantango-api-0.1.3 lib/cantango/api/account.rb
cantango-api-0.1.2 lib/cantango/api/account.rb
cantango-api-0.1.1 lib/cantango/api/account.rb
cantango-api-0.1.0 lib/cantango/api/account.rb