Module: RubiGen::Options::ClassMethods

### Home Classes Methods

### In Files

- lib/rubigen/options.rb

### Methods

- #default_options
- #full_options
- #inherited_with_options
- #mandatory_options

### Files

- History.txt
- License.txt
- Manifest.txt
- Todo.txt
- README.txt
- index.txt
- version-raw.txt
- version.txt

### Class/Module Index

Quicksearch

- RubiGen
- RubiGen::AbstractGemSource
- RubiGen::Base
- RubiGen::Commands
- RubiGen::Commands::Base
- RubiGen::Commands::Create
- RubiGen::Commands::Destroy
- RubiGen::Commands::List
- RubiGen::Commands::RewindBase
- RubiGen::Commands::Update
- RubiGen::GemPathSource
- RubiGen::GeneratedAttribute
- RubiGen::GeneratorError
- RubiGen::GeneratorTestHelper
- RubiGen::Lookup
- RubiGen::Lookup::ClassMethods
- RubiGen::Manifest
- RubiGen::Options
- RubiGen::Options::ClassMethods
- RubiGen::PathFilteredSource
- RubiGen::PathSource
- RubiGen::Scripts
- RubiGen::Scripts::Base
- RubiGen::Scripts::Destroy
- RubiGen::Scripts::Generate
- RubiGen::Scripts::Update
- RubiGen::Source
- RubiGen::Spec
- RubiGen::UsageError
- Rubigen
- Rubigen::CLI
- Dir
- Object

No matching classes.

# RubiGen::Options::ClassMethods

### Public Instance Methods

default_options(options = nil) click to toggle source

    # File lib/rubigen/options.rb, line 29
    def default_options(options = nil)
      if options
        write_inheritable_attribute(:default_options, options)
      else
        read_inheritable_attribute(:default_options) or write_inheritable_attribute(:default_options, {})
      end
    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
    def full_options(runtime_options = {})
      default_options.merge(runtime_options).merge(mandatory_options)
    end

inherited_with_options(sub) click to toggle source

    # File lib/rubigen/options.rb, line 16
    def inherited_with_options(sub)
      inherited_without_options(sub) if respond_to?(:inherited_without_options)
      sub.extend(RubiGen::Options::ClassMethods)
    end

mandatory_options(options = nil) click to toggle source

    # File lib/rubigen/options.rb, line 21
    def mandatory_options(options = nil)
      if options
        write_inheritable_attribute(:mandatory_options, options)
      else
        read_inheritable_attribute(:mandatory_options) or write_inheritable_attribute(:mandatory_options, {})
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.