Sha256: eb1ac16ed121a0de50af17decb90dce2a38557fa7d7c6e9442eea6f16cd131bd

Contents?: true

Size: 347 Bytes

Versions: 5

Compression:

Stored size: 347 Bytes

Contents

# coding: utf-8

require 'astrolabe/node'

module Astrolabe
  # This module provides a shorthand method to create a {Node} like `AST::Sexp`.
  #
  # @see http://rubydoc.info/gems/ast/AST/Sexp
  module Sexp
    # Creates a {Node} with type `type` and children `children`.
    def s(type, *children)
      Node.new(type, children)
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe/sexp.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe/sexp.rb
astrolabe-1.3.1 lib/astrolabe/sexp.rb
astrolabe-1.3.0 lib/astrolabe/sexp.rb
astrolabe-1.2.1 lib/astrolabe/sexp.rb