class ModelMaker::DefaultRunner
Attributes
pathname[RW]
Public Class Methods
new()
click to toggle source
# File src/lib/modelmaker.rb, line 353 def initialize @pathname = 'Model' # Look for a file 'Model' in this directory end
Public Instance Methods
run()
click to toggle source
# File src/lib/modelmaker.rb, line 357 def run if not File.exists?(@pathname) raise 'No "Model" file found in the current directory' end project = Project.new() source = File.new(@pathname).read() builder = ProjectBuilder.new(project) builder.instance_eval(source, @pathname, 1) generator = Source::Generator.new(project) generator.generate() end