Class: Skydrive::Folder
- Inherits:
-
Object
- Object
- Skydrive::Folder
- Defined in:
- lib/skydrive/folder.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
-
#folders ⇒ Object
Returns the value of attribute folders.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_uri ⇒ Object
Returns the value of attribute parent_uri.
-
#server_relative_url ⇒ Object
Returns the value of attribute server_relative_url.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def files @files end |
#folders ⇒ Object
Returns the value of attribute folders.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def folders @folders end |
#icon ⇒ Object
Returns the value of attribute icon.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def icon @icon end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def name @name end |
#parent_uri ⇒ Object
Returns the value of attribute parent_uri.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def parent_uri @parent_uri end |
#server_relative_url ⇒ Object
Returns the value of attribute server_relative_url.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def server_relative_url @server_relative_url end |
#uri ⇒ Object
Returns the value of attribute uri.
3 4 5 |
# File 'lib/skydrive/folder.rb', line 3 def uri @uri end |
Instance Method Details
#parse_parent_uri ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/skydrive/folder.rb', line 5 def parse_parent_uri if self.uri && self.server_relative_url.split('/').count > 4 self.parent_uri = { uri: self.uri.split(/\//)[0...-1].join('/') + "')" } else self.parent_uri = nil end end |