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



13
14
15
# File 'lib/guard/options.rb', line 13

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

Instance Method Details

#fetch(name) ⇒ Object



18
19
20
# File 'lib/guard/options.rb', line 18

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