Module: ContextSpook

Includes:
DSLKit::Interpreter
Defined in:
lib/context_spook/generator.rb,
lib/context_spook.rb,
lib/context_spook/version.rb

Overview

The ContextSpook module serves as a namespace container for collecting and organizing project information for AI assistance.

Defined Under Namespace

Classes: Generator

Constant Summary collapse

VERSION =

ContextSpook version

'0.0.1'
VERSION_ARRAY =

:nodoc:

VERSION.split('.').map(&:to_i)
VERSION_MAJOR =

:nodoc:

VERSION_ARRAY[0]
VERSION_MINOR =

:nodoc:

VERSION_ARRAY[1]
VERSION_BUILD =

:nodoc:

VERSION_ARRAY[2]

Class Method Summary collapse

Class Method Details

.generate_context(filename) ⇒ ContextSpook::Generator::Context

The generate_context method processes a context definition file and returns the resulting context object.

This method reads the content of a specified file, parses it using the generator’s parsing mechanism, and extracts the configured context from the parsed result.

from the file contents

Parameters:

  • filename (String)

    the path to the context definition file to be processed

Returns:



22
23
24
# File 'lib/context_spook/generator.rb', line 22

def self.generate_context(filename)
  Generator.send(:new).send(:parse, File.read(filename)).context
end