class TroleGroups::Macros::Configuration::BaseLoader

Attributes

orm[R]
strategy[R]

Public Class Methods

new(strategy, orm) click to toggle source
# File lib/trole_groups/macros/configuration/base_loader.rb, line 6
def initialize strategy, orm
  @strategy = strategy
  @orm = orm || Troles::Config.default_orm
end

Public Instance Methods

base_class() click to toggle source
# File lib/trole_groups/macros/configuration/base_loader.rb, line 20
def base_class
  "BaseMany"
end
namespace() click to toggle source
# File lib/trole_groups/macros/configuration/base_loader.rb, line 24
def namespace
  'TroleGroups'
end
orm_namespace() click to toggle source
# File lib/trole_groups/macros/configuration/base_loader.rb, line 28
def orm_namespace
  ns = namespace
  ns << "::#{orm.to_s.camelize}" if orm
  ns
end
try_module(full_name) click to toggle source
# File lib/trole_groups/macros/configuration/base_loader.rb, line 11
def try_module full_name
  begin
    full_name.constantize
    true
  rescue
    false
  end
end