Class: Alf::Shell::Alfrc

Inherits:
Support::Config
  • Object
show all
Defined in:
lib/alf/shell/alfrc.rb

Instance Method Summary collapse

Instance Method Details

#alfrc(path = nil) {|_self| ... } ⇒ Object

If ‘path` is provided, evaluates the content of the file on this instance. Also, if a block is passed, yields it with self. Return self in any case.

Yields:

  • (_self)

Yield Parameters:



35
36
37
38
39
# File 'lib/alf/shell/alfrc.rb', line 35

def alfrc(path = nil)
  ::Kernel.eval(Path(path).read, binding, path.to_s) if path
  yield(self) if block_given?
  self
end