Module: Usable
- Defined in:
- lib/usable/scoped.rb,
lib/usable.rb,
lib/usable/version.rb
Overview
Note:
UNTESTED and not included by default
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.1.0".freeze
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
5 6 7 |
# File 'lib/usable.rb', line 5 def config @config ||= Config.new end |
#use(mod, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/usable.rb', line 9 def use(mod, = {}) send :include, mod unless self < mod if block_given? yield config else .each { |k, v| config.public_send "#{k}=", v } end end |