Class: Pipewrench::Shell

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/pipewrench.rb

Instance Method Summary collapse

Constructor Details

#initialize(stdin) ⇒ Shell

Returns a new instance of Shell.



7
8
9
# File 'lib/pipewrench.rb', line 7

def initialize(stdin)
  @stdin = stdin
end

Instance Method Details

#each(&blk) ⇒ Object



15
16
17
# File 'lib/pipewrench.rb', line 15

def each(&blk)
  @stdin.each_line(&blk)
end

#run(cmd) ⇒ Object



11
12
13
# File 'lib/pipewrench.rb', line 11

def run(cmd)
  instance_eval(cmd)
end