Class: Alf::Shell::Alfrc
- Inherits:
-
Support::Config
- Object
- Support::Config
- Alf::Shell::Alfrc
- Defined in:
- lib/alf/shell/alfrc.rb
Instance Method Summary collapse
-
#alfrc(path = nil) {|_self| ... } ⇒ Object
If ‘path` is provided, evaluates the content of the file on this instance.
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.
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 |