Class: Shell::Echo
- Inherits:
-
BuiltInCommand
- Object
- Filter
- BuiltInCommand
- Shell::Echo
- Defined in:
- lib/shell/builtin-command.rb
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary (collapse)
- - (Object) each(rs = nil)
-
- (Echo) initialize(sh, *strings)
constructor
A new instance of Echo.
Methods inherited from BuiltInCommand
Methods inherited from Filter
#+, #<, #>, #>>, #inspect, #to_a, #to_s, #|
Methods included from Enumerable
Constructor Details
- (Echo) initialize(sh, *strings)
A new instance of Echo
35 36 37 38 |
# File 'lib/shell/builtin-command.rb', line 35 def initialize(sh, *strings) super sh @strings = strings end |
Instance Method Details
- (Object) each(rs = nil)
40 41 42 43 44 45 |
# File 'lib/shell/builtin-command.rb', line 40 def each(rs = nil) rs = @shell.record_separator unless rs for str in @strings yield str + rs end end |