RubiGen::Options::ClassMethods

Public Instance Methods

default_options(options = nil) click to toggle source
    # File lib/rubigen/options.rb, line 29
29:       def default_options(options = nil)
30:         if options
31:           write_inheritable_attribute(:default_options, options)
32:         else
33:           read_inheritable_attribute(:default_options) or write_inheritable_attribute(:default_options, {})
34:         end
35:       end
full_options(runtime_options = {}) click to toggle source

Merge together our class options. In increasing precedence:

  default_options   (class default options)
  runtime_options   (provided as argument)
  mandatory_options (class mandatory options)
    # File lib/rubigen/options.rb, line 41
41:       def full_options(runtime_options = {})
42:         default_options.merge(runtime_options).merge(mandatory_options)
43:       end
inherited_with_options(sub) click to toggle source
    # File lib/rubigen/options.rb, line 16
16:       def inherited_with_options(sub)
17:         inherited_without_options(sub) if respond_to?(:inherited_without_options)
18:         sub.extend(RubiGen::Options::ClassMethods)
19:       end
mandatory_options(options = nil) click to toggle source
    # File lib/rubigen/options.rb, line 21
21:       def mandatory_options(options = nil)
22:         if options
23:           write_inheritable_attribute(:mandatory_options, options)
24:         else
25:           read_inheritable_attribute(:mandatory_options) or write_inheritable_attribute(:mandatory_options, {})
26:         end
27:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.