Method: Staticky::Files#inject_line_after

Defined in:
lib/staticky/files.rb

#inject_line_after(path, target, contents) ⇒ Object

Inject contents in path after target.

Parameters:

  • path (String, Pathname)

    the path to file

  • target (String, Regexp)

    the target to replace

  • contents (String)

    the contents to inject

Raises:

See Also:

Since:

  • 0.1.0



422
423
424
# File 'lib/staticky/files.rb', line 422

def inject_line_after(path, target, contents)
  _inject_line_after(path, target, contents, method(:index))
end