Exception: Staticky::Files::MissingTargetError

Inherits:
Error
  • Object
show all
Defined in:
lib/staticky/files/error.rb

Overview

File manipulations error. Raised when the given ‘target` cannot be found in `path`.

Instance Method Summary collapse

Constructor Details

#initialize(target, path) ⇒ Staticky::Files::MissingTargetError

Returns the new error.

Parameters:

  • target (String, Regexp)

    the missing target

  • path (String, Pathname)

    the file



38
39
40
41
42
43
# File 'lib/staticky/files/error.rb', line 38

def initialize(target, path)
  super("cannot find `#{target}' in `#{path}'")

  @_target = target
  @_path = path
end

Instance Method Details

#pathString, Pathname

The missing target

Returns:

  • (String, Pathname)

    the file



55
56
57
# File 'lib/staticky/files/error.rb', line 55

def path
  @_path
end

#targetString, Regexp

The missing target

Returns:

  • (String, Regexp)

    the missing target



48
49
50
# File 'lib/staticky/files/error.rb', line 48

def target
  @_target
end