Sha256: 52a2b3bf6f63d937e23181f803d684bbac860b5295a502bb76b60f74c26f5c8b
Contents?: true
Size: 336 Bytes
Versions: 1
Compression:
Stored size: 336 Bytes
Contents
require "ostruct" require "usable/version" module Usable def config @config ||= Config.new end def use(mod, options = {}) send :include, mod unless self < mod if block_given? yield config else options.each { |k, v| config.public_send "#{k}=", v } end end class Config < OpenStruct end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
usable-0.1.0 | lib/usable.rb |