Sha256: b4e62b8ee3b14a1b0b9db4cdf5aef6c8928455538a7585fbd329c0247824665d

Contents?: true

Size: 293 Bytes

Versions: 26

Compression:

Stored size: 293 Bytes

Contents

module Trestle
  class Builder
    def self.target(name)
      attr_reader name
      alias_method :target, name
    end

    def self.build(*args, &block)
      new(*args).build(&block)
    end

    def build(&block)
      instance_eval(&block) if block_given?
      target
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
trestle-0.10.1 lib/trestle/builder.rb
trestle-0.10.0 lib/trestle/builder.rb
trestle-0.10.0.pre2 lib/trestle/builder.rb
trestle-0.10.0.pre lib/trestle/builder.rb
trestle-0.9.8 lib/trestle/builder.rb
trestle-0.9.7 lib/trestle/builder.rb
trestle-0.9.6 lib/trestle/builder.rb
trestle-0.9.5 lib/trestle/builder.rb
trestle-0.9.4 lib/trestle/builder.rb
trestle-0.9.3 lib/trestle/builder.rb
trestle-0.9.2 lib/trestle/builder.rb
trestle-0.9.1 lib/trestle/builder.rb
trestle-0.9.0 lib/trestle/builder.rb
trestle-0.8.13 lib/trestle/builder.rb
trestle-0.8.12 lib/trestle/builder.rb
trestle-0.8.11 lib/trestle/builder.rb
trestle-0.8.10 lib/trestle/builder.rb
trestle-0.8.9 lib/trestle/builder.rb
trestle-0.8.8 lib/trestle/builder.rb
trestle-0.8.7 lib/trestle/builder.rb