All Projects → raviqqe → block-is-array

raviqqe / block-is-array

Licence: Unlicense license
Block is Array (See also https://github.com/raviqqe/block-is-hash)

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

block-is-array

Build Status License

Block is Array

Installation

$ gem install block-is-array

Usage

Code:

require 'block-is-array'

array = block_is_array do
  user :www

  http do
    server do
      listen 80
      server_name 'foo.com'
    end

    server do
      listen 443, :ssl
      server_name 'bar.com'
    end
  end
end

p array

Output:

[[:user, :www], [:http, [[:server, [[:listen, 80], [:server_name, "foo.com"]]], [:server, [[:listen, 443, :ssl], [:server_name, "bar.com"]]]]]]

For more examples, see examples directory.

License

The Unlicense

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].