Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Helpers for creating internal DSLs
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
README.rdoc
Rakefile
VERSION

README.rdoc

Dsl Helper

Usage

require 'dsl_helper'

class MyDSLConfig

  include DslHelper

  dsl_attr :host, :port, :name
end

config = MyDSLConfig.new.instance_eval do
  host 'localhost'
  port 11345
  name 'my_network_thingy'
end

Then calls to the underscore versions of the attribute accessors work normally

config._host

Returns

>> 'localhost'
Something went wrong with that request. Please try again.