Module: NsOptions::DSL
- Defined in:
- lib/ns-options.rb
Instance Method Summary collapse
-
#options(name, *args, &block) ⇒ Object
(also: #opts, #namespace, #ns)
This is the main DSL method for creating a namespace of options for your class/module.
Instance Method Details
#options(name, *args, &block) ⇒ Object Also known as: opts, namespace, ns
This is the main DSL method for creating a namespace of options for your class/module. This will define a class method for classes/modules and an additional instance method for classes.
26 27 28 29 |
# File 'lib/ns-options.rb', line 26 def (name, *args, &block) NsOptions::RootMethods.new(self, name).define($stdout, caller) self.send(name, *args, &block) end |