Class: Skydrive::Folder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filesObject

Returns the value of attribute files.



3
4
5
# File 'lib/skydrive/folder.rb', line 3

def files
  @files
end

#foldersObject

Returns the value of attribute folders.



3
4
5
# File 'lib/skydrive/folder.rb', line 3

def folders
  @folders
end

#iconObject

Returns the value of attribute icon.



3
4
5
# File 'lib/skydrive/folder.rb', line 3

def icon
  @icon
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/skydrive/folder.rb', line 3

def name
  @name
end

#parent_uriObject

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_urlObject

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

#uriObject

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_uriObject



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