Class: AirVideo::Client::FolderObject

Inherits:
Object
  • Object
show all
Defined in:
lib/airvideo.rb

Overview

Represents a folder as listed by the AirVideo server.

Has helper functions like #cd which will move the current directory of the originating AirVideo::Client instance to this folder.

Constant Summary collapse

Helpers =
[:cd, :ls, :search]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server, name, location) ⇒ FolderObject

Shouldn’t be used outside of the AirVideo module



193
194
195
196
197
# File 'lib/airvideo.rb', line 193

def initialize(server,name,location) # :nodoc:
  @server = server
  @name = name
  @location = "/"+location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



189
190
191
# File 'lib/airvideo.rb', line 189

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



189
190
191
# File 'lib/airvideo.rb', line 189

def name
  @name
end

Instance Method Details

#cdObject



203
204
205
# File 'lib/airvideo.rb', line 203

def cd
  @server.cd(self)
end

#inspectObject



199
200
201
# File 'lib/airvideo.rb', line 199

def inspect
  "<Folder: #{(name.nil?) ? "/Unknown/" : name}>"
end

#lsObject



207
208
209
# File 'lib/airvideo.rb', line 207

def ls
  @server.ls(self)
end

#search(re_string) ⇒ Object



211
212
213
# File 'lib/airvideo.rb', line 211

def search(re_string)
  @server.search(re_string,self)
end