OpenDSL  OpenDSL

Parent

  • Module

Class Index [+]

Quicksearch
[Validate]
Generated with RDazzle Redfish 1.4.0

OpenDSL

OpenDSL is a clever way to create a plugable free-form domain specific language.

  Example = OpenDSL.new do
    size do
      100
    end
  end

  class Foo
    include Example
  end

  Foo.new.size  #=> 100

Constants

VERSION

Public Class Methods

new(&block) click to toggle source
    # File lib/opendsl.rb, line 21
21:   def initialize(&block)
22:     instance_eval(&block) if block_given?
23:   end

Public Instance Methods

method_missing(s, *a, &b) click to toggle source
    # File lib/opendsl.rb, line 26
26:   def method_missing(s, *a, &b)
27:     if block_given?
28:       define_method(s, &b)
29:     else
30:       super(s, *a, &b)
31:     end
32:   end

Disabled; run with --debug to generate this.