Module: TroleGroups::Api::ClassMethods

Included in:
TroleGroups::Api
Defined in:
lib/trole_groups/api.rb

Instance Method Summary collapse

Instance Method Details

#apisObject



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

def apis
  [:core, :cache, :config, :event, :read, :validation, :write]
end

#included(base) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/trole_groups/api.rb', line 17

def included(base)
  apis.each do |api|
    begin
      base.include_and_extend :"#{api.to_s.camelize}"
    rescue
      puts "include error: #{api}"
    end
  end
end