class Yasp
Public Class Methods
file(filename, &block)
click to toggle source
outputs to file
# File lib/yasp.rb, line 11 def self.file(filename, &block) file = File.open(filename,"w+") file.write(stringify(&block)) file.close end
stringify(&block)
click to toggle source
compiles all symbols into their text representation in the correct order
# File lib/yasp.rb, line 18 def self.stringify(&block) parse(block).to_scad end
yell(&block)
click to toggle source
# File lib/yasp.rb, line 6 def self.yell(&block) puts stringify(&block) end
Private Class Methods
parse(block)
click to toggle source
interprets the code into symbols – commands, because Symbol is already a class
# File lib/yasp.rb, line 25 def self.parse(block) YaspTree.new(block) end