Include the Playbook Module.

        .. Note:: Playbook methods can be accessed using ``tcex.playbook.<method>``.
961946
def playbook(self):
        
        if self._playbook is None:
            from .tcex_playbook import TcExPlaybook

            self._playbook = TcExPlaybook(self)
        return self._playbook
148804
def include_sqlalchemy_models(nc, Base):
    

    from sqlalchemy.ext.declarative.clsregistry import _ModuleMarker

    # Include all SQLAlchemy models in the local namespace
    for name, klass in Base._decl_class_registry.items():
        print(name, klass)
        if isinstance(klass, _ModuleMarker):
            continue

        add_script(nc, get_import_statement(klass))
        add_greeting(nc, "* **{}** - {}".format(klass.__name__, get_dotted_path(klass)))
826058
public void setImportMethods(Object[] importMethods) {
        for (Object function : importMethods) {
            if (function instanceof Class) {
                this.functions.put((Class<?>) function, function);
            } else {
                this.functions.put(function.getClass(), function);
            }
        }
    }
350444
def method_missing(method, *args, &block)
      return super unless method =~ /^find_(all_|last_|or_(initialize_|create_))?by_/

      result = object_class.send(method, *args, &block)
      options = args.extract_options!

      if method =~ /^find_all/
        decorate_collection(result, options)
      else
        decorate(result, options)
      end
    end
248259
def statusable_methods
      # Include generated methods with a module, not right in class.
      @statusable_methods ||= Module.new.tap do |m|
        m.const_set :ClassMethods, Module.new
        include m
        extend m::ClassMethods
      end
    end
1232820
def method_missing(name, *args, &block)
      return attributes[name.to_sym] if attributes.include?(name.to_sym)
      return super
    end
1212380
def do_includes
      @body.scan(/rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/) do |c,m|
        if cls = @classes[c]
          m = @known_classes[m] || m
          cls.add_include(Include.new(m, ""))
        end
      end
    end
396871
def main():
    
    import jsonschema
    parser = argparse.ArgumentParser(version=__version__)
    parser.add_argument(
        '--verbose', action='store_true', default=False,
        help='Turn on verbose output.')
    parser.add_argument(
        '--header', action='store_true', default=False,
        help='Turn on header.')
    parser.add_argument(
        'playbooks', metavar='PLAYBOOKS', type=str, nargs='+',
        help='The playbook(s) to lint.')

    args = parser.parse_args()

    validation_results = {}
    all_valid = True
    # Load the playbook schema
    with open(resource_filename(
            'relent', 'schemas/playbook_schema.json'), 'r') as schema_fp:
        schema = json.load(schema_fp)
        # Do checks against playbooks
        for playbook in args.playbooks:
            try:
                with open(playbook, 'r') as pb:
                    # Schema check
                    jsonschema.validate(json.load(pb), schema)
            except jsonschema.ValidationError, e:
                all_valid = False
                validation_results[playbook] = (
                    False, e.message, list(e.schema_path), str(e))
            except ValueError, e:
                all_valid = False
                validation_results[playbook] = (
                    False, 'JSON is invalid.', str(e), str(e))

    # If all_valid is True then return back happy results
    if all_valid is True:
        if args.verbose or args.header:
            parser._print_message('Found 0 issues.\n')
        raise SystemExit(0)
    else:
        if args.verbose or args.header:
            parser._print_message('Found %s issues.\n\n' % len(
                validation_results))
        for problem_playbook in validation_results.keys():
            parser._print_message('%s: E: %s %s\n' % (
                problem_playbook,
                validation_results[problem_playbook][1],
                validation_results[problem_playbook][2]))
            if args.verbose:
                parser._print_message(
                    validation_results[problem_playbook][3] + '\n--\n')
        raise SystemExit(1)
890052
def method_missing(method, *args, &block)
      case method.to_s
      when /^to_(.*)_from_(.*)$/
        if CODEMAP[$1] && CODEMAP[$2]
          define_and_call_method(method) { translate(CODEMAP[$1], :from => CODEMAP[$2]) }
        else
          original_method_missing(method, *args, &block)
        end
      when /^from_(.*)_to_(.*)$/
        if CODEMAP[$1] && CODEMAP[$2]
          define_and_call_method(method) { translate(CODEMAP[$2], :from => CODEMAP[$1]) }
        else
          original_method_missing(method, *args, &block)
        end
      when /^to_(.*)$/
        if CODEMAP[$1]
          define_and_call_method(method) { translate(CODEMAP[$1]) }
        else
          original_method_missing(method, *args, &block)
        end
      else
        original_method_missing(method, *args, &block)
      end
    end
191960
def include_required_submodules!
      class_eval do
        @sorcery_config.submodules = ::Sorcery::Controller::Config.submodules
        @sorcery_config.submodules.each do |mod|
          # TODO: Is there a cleaner way to handle missing submodules?
          # rubocop:disable Lint/HandleExceptions
          begin
            include Submodules.const_get(mod.to_s.split('_').map(&:capitalize).join)
          rescue NameError
            # don't stop on a missing submodule. Needed because some submodules are only defined
            # in the controller side.
          end
          # rubocop:enable Lint/HandleExceptions
        end
      end
    end
577414
def _load_methods(package):
    
    global _methods
    _methods[package] = None
    
    from acorn.config import settings
    from acorn.logging.descriptors import _obj_getattr
    spack = settings(package)
    if spack is not None:
        if spack.has_section("analysis.methods"):
            _methods[package] = {}
            
            from importlib import import_module
            mappings = dict(spack.items("analysis.methods"))
            for fqdn, target in mappings.items():
                rootname = target.split('.')[0]
                root = import_module(rootname)
                caller = _obj_getattr(root, target)
                _methods[package][fqdn] = caller
1169619
def prepare(self):
        
        pb = self._get_ansible_playbook(self.playbooks.prepare)
        pb.execute()
537759
def include(_name_or_func, *args,
            _module=None, _default='includeme', **kwargs):
    
    if callable(_name_or_func):
        resolved = _name_or_func
    else:
        resolved = resolve_str(_name_or_func, _module, _default)

    resolved(*args, **kwargs)
1373166
def method_missing(meth, *args)
      if include?(meth.to_s) then
        if args.empty? then
          create_getter meth
        else
          raise ArgumentError, "wrong number of arguments (#{args.size} for 0)"
        end
      elsif meth.to_s =~ /^(.+)\?$/ and include?(root_meth = $1) then
        if args.empty? then
          !!create_getter(root_meth) #TODO duplication of logic
        else
          raise ArgumentError, "wrong number of arguments (#{args.size} for 0)"
        end
      else
        super
      end
    end
869495
def method_missing(meth, *args, &block)
      # Check to see if it can be evaluated
      if(matches? meth)
        #Defines the method and caches it to the class
        self.class.send(:define_method, meth) do
          # Uses data_field and format_field to translate the metadata.
          # debugger
          Citero.map(_data).send("from_#{_format}").send(meth)
        end
        # calls the method
        send meth, *args, &block
      else
        super
      end
    end
382798
def method_missing(method_name, *args, &block)
      if @object.loaded? || METHODS_WITHOUT_RELOAD.include?(method_name)
        # no need to reload
      else
        StorageRoom.log("Reloading #{@object['url']} due to #{method_name}")
        @object.reload(@object['url'], @parameters)
      end

      @object.send(method_name, *args, &block)       
    end
921083
protected void maybeLoadMethods ()
    {
        if (_methodMap == null) {
            _methodMap = new HashMap<String,List<Member>>();
            Method[] methods = _clazz.getMethods();

            for (int i = 0; i < methods.length; ++i) {
                Method m = methods[i];
                String methodName = m.getName();
                Class<?>[] paramTypes = m.getParameterTypes();

                List<Member> list = _methodMap.get(methodName);
                if (list == null) {
                    list = new ArrayList<Member>();
                    _methodMap.put(methodName, list);
                }

                if (!ClassUtil.classIsAccessible(_clazz)) {
                    m = ClassUtil.getAccessibleMethodFrom(_clazz, methodName, paramTypes );
                }

                if (m != null) {
                    list.add(m);
                    _paramMap.put(m, paramTypes);
                }
            }
        }
    }