Sha256: 80f1f759323ca0eef99aa4304036d43ea2c0d5bc6e25a2692dafe45d9716ee6e
Contents?: true
Size: 711 Bytes
Versions: 4
Compression:
Stored size: 711 Bytes
Contents
require 'sugar-high/array' require 'sugar-high/blank' require 'hashie' require 'sweetloader' SweetLoader.namespaces = {:CanTango => 'cantango'} SweetLoader.mode = :require module CanTango module Api sweetload :Attributes, :Options, :Common, :Ability, :Account, :Can sweetload :Model, :Scope, :Session, :User def self.apis [:ability, :can, :scope, :session] end apis.each do |api| clazz = api.to_s.camelize self.extend "CanTango::Api::#{clazz}::User".constantize self.extend "CanTango::Api::#{clazz}::Account".constantize end # FIX - sweetloader, camelize there! sweetload *apis.map{|api| api.to_s.camelize} end end require 'cantango/api_ext'
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
cantango-api-0.1.3 | lib/cantango/api.rb |
cantango-api-0.1.2 | lib/cantango/api.rb |
cantango-api-0.1.1 | lib/cantango/api.rb |
cantango-api-0.1.0 | lib/cantango/api.rb |