class Orchparty::RootBuilder
Public Class Methods
new()
click to toggle source
# File lib/orchparty/dsl_parser.rb, line 36 def initialize @root = AST.root end
Public Instance Methods
_build()
click to toggle source
# File lib/orchparty/dsl_parser.rb, line 58 def _build @root end
application(name, &block)
click to toggle source
# File lib/orchparty/dsl_parser.rb, line 48 def application(name, &block) @root.applications[name] = ApplicationBuilder.build(name, block) self end
import(rel_file)
click to toggle source
# File lib/orchparty/dsl_parser.rb, line 40 def import(rel_file) old_file_path = Pathname.new(caller[0][/[^:]+/]).parent rel_file_path = Pathname.new rel_file new_file_path = old_file_path + rel_file_path file_content = File.read(new_file_path) instance_eval(file_content, new_file_path.expand_path.to_s) end
mixin(name, &block)
click to toggle source
# File lib/orchparty/dsl_parser.rb, line 53 def mixin(name, &block) @root._mixins[name] = MixinBuilder.build(name, block) self end