Module: NsOptions::Proxy
- Defined in:
- lib/ns-options/proxy.rb
Defined Under Namespace
Modules: ClassReceiverExtendMethods, ClassReceiverIncludeMethods, ModuleReceiverExtendMethods, ProxyMethods
Constant Summary collapse
- NAMESPACE =
Mix this in to any module or class to make it proxy a namespace this means you can interact with the module/class/class-instance as if it were a namespace object itself.
"__proxy_options__"
Class Method Summary collapse
Class Method Details
.included(receiver) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ns-options/proxy.rb', line 12 def self.included(receiver) NsOptions::RootMethods.new(receiver, NAMESPACE).define receiver.class_eval { extend ProxyMethods } if receiver.kind_of?(Class) receiver.class_eval { include ProxyMethods } receiver.class_eval { extend ClassReceiverExtendMethods } receiver.class_eval { include ClassReceiverIncludeMethods } else # Module receiver.class_eval { extend ModuleReceiverExtendMethods } end end |