Sha256: c9a2e886fffccb7b3cdece8d83bec08b735fb1041a96edfcc1f7f941cf5bd646
Contents?: true
Size: 782 Bytes
Versions: 8
Compression:
Stored size: 782 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
8 entries across 8 versions & 1 rubygems