Sha256: 3f54cd37c5499bcad39cd8aacadc9381020abee74dff8171002d40ac218a206c

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

# encoding: utf-8
require 'git_cloner_dsl_model'

module GitCloner
  # Dsl
  class Dsl
    attr_accessor :git_cloner

    # String Define
    [:default_output].each do |f|
      define_method f do |value|
        @git_cloner.send("#{f}=", value)
      end
    end

    # Array/Hash/Boolean Define
    [:repos].each do |f|
      define_method f do |value|
        @git_cloner.send("#{f}=", value)
      end
    end

    def initialize
      @git_cloner = GitCloner::DslModel.new
      @git_cloner.default_output = './'
      @git_cloner.repos = []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_cloner-0.0.4 lib/git_cloner_dsl.rb