Sha256: ca5bf94faf3201e2c3228cd517757ead8e8e1e89792881d2e6cf01da127c638f
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
module Foodtaster class Config %w(log_level drb_port vagrant_binary).each do |attr| attr_accessor attr.to_sym end def initialize @log_level = :info @drb_port = 35672 @vagrant_binary = 'vagrant' 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foodtaster-0.0.1 | lib/foodtaster/config.rb |