Skip to content

API Reference

Welcome to the Ruleur API Reference documentation. This section provides detailed information about all the classes, modules, and methods available in Ruleur.

Core Components

Engine

The main execution engine for running rules against contexts.

Rule

Individual rule definitions with conditions and actions.

Context

The execution context that holds facts and results.

Condition

Conditional logic for rule evaluation.

Operators

Available operators for building conditions.

Configuration & Loading

DSL

The Domain-Specific Language for defining rules in Ruby.

YAML Loader

Load and parse rules from YAML files.

Validation

Rule validation and testing framework.

Persistence

Repositories

Database storage and version management for rules.

Getting Started

If you're new to Ruleur, we recommend starting with the Getting Started Guide before diving into the API reference.

Usage Pattern

ruby
# 1. Define rules using DSL
engine = Ruleur.define do
  rule 'example' do
    conditions do
      all?(condition)
    end
    actions do
      # ...
    end
  end
end

# 2. Run engine with context
result = engine.run(facts: data)

# 3. Access results
result[:output]

API Documentation Status

Work in Progress

This API reference is currently being developed. Each section will be populated with detailed documentation, examples, and usage patterns.

Released under the MIT License.