Class: Guard::Options

Inherits:
Thor::CoreExt::HashWithIndifferentAccess
  • Object
show all
Defined in:
lib/guard/options.rb

Overview

A class that holds options. Can be instantiated with default options.

Direct Known Subclasses

UI::Config, UI::Logger::Config

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}, default_opts = {}) ⇒ Options

Initializes an Guard::Options object. default_opts is merged into opts.

Parameters:

  • opts (Hash) (defaults to: {})

    the options

  • default_opts (Hash) (defaults to: {})

    the default options


15
16
17
# File 'lib/guard/options.rb', line 15

def initialize(opts = {}, default_opts = {})
  super(default_opts.merge(opts || {}))
end

Instance Method Details

#fetch(name) ⇒ Object


20
21
22
# File 'lib/guard/options.rb', line 20

def fetch(name)
  super(name.to_s)
end