Module: NsOptions::DSL

Defined in:
lib/ns-options.rb

Instance Method Summary collapse

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 options(name, *args, &block)
  NsOptions::RootMethods.new(self, name).define($stdout, caller)
  self.send(name, *args, &block)
end