Sha256: de81b3e9d6b0bdfb4537fbaef1c78669d96ebb9518ad0a73e6fe6616b2968029
Contents?: true
Size: 967 Bytes
Versions: 1
Compression:
Stored size: 967 Bytes
Contents
require File.dirname(__FILE__) + "/tickly/parser" require File.dirname(__FILE__) + "/tickly/node_extractor" require File.dirname(__FILE__) + "/tickly/evaluator" require 'forwardable' module Tickly VERSION = '0.0.8' # Provides the methods for quickly emitting the expression arrays, # is used in tests module Emitter def le(*elems) [:c] + elems end def e(*elems) elems end def se(*elems) [:b] + elems end end # Converts a passed Array (received from a Parser) # into a TCL expression. This is only ever used in tests def self.to_tcl(e) if e.is_a?(Array) && e[0] == :c '{%s}' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Array) && e[0] == :b '[%s]' % e.map{|e| to_tcl(e)}.join(' ') elsif e.is_a?(Array) e.map{|e| to_tcl(e)}.join(" ") elsif e.is_a?(String) && (e.include?('"') || e.include?("'")) e.inspect else e.to_s end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tickly-0.0.8 | lib/tickly.rb |