DSeL

You can use DSeL (pronounced Diesel – best I could do) to:

Currently an unstable work in progress, touch at own risk.

Description

It is:

Installation

Add this line to your application’s Gemfile:

gem 'dsel', github: 'qadron/dsel'

And then execute:

$ bundle

Examples

See: examples/

API

Include the API specification:

require_relative 'examples/api/my_api'

Use via a DSL script:

MyAPI.run 'examples/api/my_api_dsl.rb'

Use via a Ruby script:

“‘ruby require ’examples/api/my_api_ruby’ ““

See: examples/api/

DSL

See: examples/dsl/object.rb

Proxy

The safe way to get a DSL is to run the object inside a Proxy context and just proxy methods, thus allowing the user to interact with the object as if operating within it semantically but without access to non-public methods or its state.

See: examples/dsl/proxy.rb

Direct

The direct way means not having the object inside the environment, but the environment inside the object, thus allowing you to truly operate within it and make a general mess of things or do some pretty cool stuff.

See: examples/dsl/direct.rb

Contributing

Bug reports and pull requests are welcome on GitHub at github.com/qadron/dsel.

License

Please see the LICENSE.md file.