Sha256: 4409ccab06d5dcd7f1ee783acf08e98351d4a349985af4a04565eab8fb368082

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

module Catfish
  class Dsl
    def self.evaluate
      builder = new
      builder.eval_catfishfile
    end

    attr_accessor :servers

    def initialize
      @servers = []
    end

    def eval_catfishfile
      catfishfile = 'Catfishfile'
      contents = File.read(catfishfile).strip
      instance_eval(contents, catfishfile.to_s, 1)
    end

    def server(name, *_args)
      servers << name
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
catfish-0.0.3 lib/catfish/dsl.rb
catfish-0.0.2 lib/catfish/dsl.rb