Class
Class Methods
lib/shell/builtin-command.rb
View on GitHub
# File tmp/rubies/ruby-2.3.8/lib/shell/builtin-command.rb, line 67
def initialize(sh, pattern)
super sh
@pattern = pattern
end
No documentation available
Instance Methods
lib/shell/builtin-command.rb
View on GitHub
# File tmp/rubies/ruby-2.3.8/lib/shell/builtin-command.rb, line 73
def each(rs = nil)
if @pattern[0] == ?/
@files = Dir[@pattern]
else
prefix = @shell.pwd+"/"
@files = Dir[prefix+@pattern].collect{|p| p.sub(prefix, "")}
end
rs = @shell.record_separator unless rs
for f in @files
yield f+rs
end
end
No documentation available