class Rybfile::DomainSpecificLanguage
Public Class Methods
for(rybfile)
click to toggle source
# File lib/rybfile.rb, line 20 def self.for(rybfile) # Hide behind a SimpleDelegator so users don't play with our internals. SimpleDelegator.new(self.new(rybfile)) end
new(rybfile)
click to toggle source
# File lib/rybfile.rb, line 7 def initialize(rybfile) @rybfile = rybfile end
Public Instance Methods
project(name, opts={}, &block)
click to toggle source
# File lib/rybfile.rb, line 11 def project(name, opts={}, &block) # TODO(mtwilliams): Allow multiple projects? # TODO(mtwilliams): Allow other Rybfiles to be 'included'. @rybfile.project = Ryb::Project.new @rybfile.project.name = Ryb::Name.new(name, :pretty => opts[:pretty]) Ryb::DomainSpecificLanguage.for(@rybfile.project).instance_eval(&block) end