Class: Swineherd::BaseFileSystem::BaseFile

Inherits:
Object
  • Object
show all
Defined in:
lib/swineherd/filesystem/basefilesystem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &blk) ⇒ BaseFile

Returns a new instance of BaseFile.



87
88
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 87

def initialize *args, &blk
end

Instance Attribute Details

#modeObject

Returns the value of attribute mode.



84
85
86
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 84

def mode
  @mode
end

#pathObject

Returns the value of attribute path.



84
85
86
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 84

def path
  @path
end

#schemeObject

Returns the value of attribute scheme.



84
85
86
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 84

def scheme
  @scheme
end

Instance Method Details

#close(*args) ⇒ Object

Close the file



118
119
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 118

def close *args
end

#open(path, mode = "r", &blk) ⇒ Object

A new file in the filesystem needs to be instantiated with a path, a mode (read ‘r’ or write ‘w’).



94
95
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 94

def open path, mode="r", &blk
end

#readObject

Return whole file and as a string



100
101
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 100

def read
end

#readlineObject

Return a line from stream



106
107
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 106

def readline
end

#write(string) ⇒ Object

Writes a string to the file



112
113
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 112

def write string
end