Sha256: 089393a59539be4a2da2d175ea64e43b100c2e977d165121c3b39729bfaf92a2
Contents?: true
Size: 649 Bytes
Versions: 5
Compression:
Stored size: 649 Bytes
Contents
module Foodtaster class Config %w(log_level drb_port vagrant_binary shutdown_vms skip_rollback start_server).each do |attr| attr_accessor attr.to_sym end def initialize @log_level = :info @drb_port = 35672 @vagrant_binary = 'vagrant' @shutdown_vms = false @skip_rollback = false @start_server = true end def self.default self.new end end class << self def config @config ||= Config.default end def configure if block_given? yield(self.config) else raise ArgumentError, "No block given" end end end end
Version data entries
5 entries across 5 versions & 1 rubygems