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.



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

def initialize *args, &blk
end

Instance Attribute Details

#modeObject

Returns the value of attribute mode.



90
91
92
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 90

def mode
  @mode
end

#pathObject

Returns the value of attribute path.



90
91
92
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 90

def path
  @path
end

#schemeObject

Returns the value of attribute scheme.



90
91
92
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 90

def scheme
  @scheme
end

Instance Method Details

#close(*args) ⇒ Object

Close the file



124
125
# File 'lib/swineherd/filesystem/basefilesystem.rb', line 124

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’).



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

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

#readObject

Return whole file and as a string



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

def read
end

#readlineObject

Return a line from stream



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

def readline
end

#write(string) ⇒ Object

Writes a string to the file



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

def write string
end