Sha256: 4045d5c79cc085ac654418eebb0e508ed4f313e30ccab38b05c674026b7aeb2a
Contents?: true
Size: 781 Bytes
Versions: 21
Compression:
Stored size: 781 Bytes
Contents
class TeutonFile def initialize(teuton_host, param) @teuton_host = teuton_host @parent = teuton_host.parent @result = @parent.result @host = teuton_host.host @param = param end def exist? @parent.target("File #{@param} exists?") @parent.run "file #{@param}", on: @host @parent.expect @result.grep_v("cannot open").grep(@param).count.eq 1 end def directory? @parent.target("File #{@param} is directory?") @parent.run "file #{@param}", on: @host @parent.expect @result.grep_v("cannot open").grep(@param).grep("directory").count.eq 1 end def regular? @parent.target("File #{@param} is regular?") @parent.run "file #{@param}", on: @host @parent.expect @result.grep(@param).grep("directory").count.eq 0 end end
Version data entries
21 entries across 21 versions & 1 rubygems