class PogoPlug::File
Attributes
id[RW]
mimetype[RW]
name[RW]
parent_id[RW]
size[RW]
type[RW]
Public Class Methods
from_json(json)
click to toggle source
# File lib/pogoplug/file.rb, line 26 def self.from_json(json) File.new( name: json['name'], id: json['fileid'], type: json['type'].to_i, mimetype: json['mimetype'], parent_id: json['parentid'], size: json['size'].to_i ) end
Public Instance Methods
directory?()
click to toggle source
# File lib/pogoplug/file.rb, line 14 def directory? @type == File::Type::DIRECTORY end
file?()
click to toggle source
# File lib/pogoplug/file.rb, line 18 def file? @type == File::Type::FILE end