Sha256: b05e6da2d78f40164dd284d7f3fe3455998312db258c67f4acd7a06e25952508

Contents?: true

Size: 534 Bytes

Versions: 5

Compression:

Stored size: 534 Bytes

Contents

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

    attr_accessor :servers, :plugins

    def initialize
      @servers = []
      @plugins = ['vagrant-managed-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

    def plugin(name, *_args)
      plugins << name
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
catfish-0.0.8 lib/catfish/dsl.rb
catfish-0.0.7 lib/catfish/dsl.rb
catfish-0.0.6 lib/catfish/dsl.rb
catfish-0.0.5 lib/catfish/dsl.rb
catfish-0.0.4 lib/catfish/dsl.rb