class Omnibus::Builder::DSLProxy

Proxies method calls to either a Builder object or the Software that the builder belongs to. Provides compatibility with our DSL where we never yield objects to blocks and hopefully hides some of the confusion that can arise from instance_eval.

Public Class Methods

new(builder, software) click to toggle source
# File lib/omnibus/builder.rb, line 42
def initialize(builder, software)
  @builder, @software = builder, software
end

Public Instance Methods

eval_block(&block) click to toggle source
# File lib/omnibus/builder.rb, line 46
def eval_block(&block)
  instance_eval(&block)
end
method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/omnibus/builder.rb, line 58
def method_missing(method_name, *args, &block)
  if @software.respond_to?(method_name)
    @software.send(method_name, *args, &block)
  else
    super
  end
end
methods() click to toggle source
Calls superclass method
# File lib/omnibus/builder.rb, line 54
def methods
  super | @software.methods
end
respond_to?(method) click to toggle source
Calls superclass method
# File lib/omnibus/builder.rb, line 50
def respond_to?(method)
  super || @software.respond_to?(method)
end