Class: AirVideo::Client::FolderObject
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
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #cd ⇒ Object
-
#initialize(server, name, location) ⇒ FolderObject
constructor
Shouldn’t be used outside of the AirVideo module.
- #inspect ⇒ Object
- #ls ⇒ Object
- #search(re_string) ⇒ Object
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
#location ⇒ Object (readonly)
Returns the value of attribute location.
189 190 191 |
# File 'lib/airvideo.rb', line 189 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
189 190 191 |
# File 'lib/airvideo.rb', line 189 def name @name end |
Instance Method Details
#cd ⇒ Object
203 204 205 |
# File 'lib/airvideo.rb', line 203 def cd @server.cd(self) end |
#inspect ⇒ Object
199 200 201 |
# File 'lib/airvideo.rb', line 199 def inspect "<Folder: #{(name.nil?) ? "/Unknown/" : name}>" end |
#ls ⇒ Object
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 |