Class: Mediafire::StoreFile
Instance Method Summary
collapse
Methods inherited from StoreObject
#date, #description, #initialize, #is_public?, #tags
Instance Method Details
#data(d) ⇒ Object
117
118
119
120
121
122
123
124
125
126
127
|
# File 'lib/mediafire/store_object.rb', line 117
def data(d)
super(d)
@filetype = d['filetype'] || ''
@key = d['quickkey'] || ''
@name = d['filename'] || ''
@password_protected = d['password_protected'] || ''
@hash = d['hash'] || ''
@size = d['size'].to_i
@downloads = d['downloads'].to_i
end
|
#downloads ⇒ Object
159
160
161
|
# File 'lib/mediafire/store_object.rb', line 159
def downloads
@downloads
end
|
#filetype ⇒ Object
129
130
131
|
# File 'lib/mediafire/store_object.rb', line 129
def filetype
@filetype
end
|
#hash ⇒ Object
Also known as:
imagekey
171
172
173
|
# File 'lib/mediafire/store_object.rb', line 171
def hash
@hash
end
|
#is_folder? ⇒ Boolean
133
134
135
|
# File 'lib/mediafire/store_object.rb', line 133
def is_folder?
false
end
|
#is_picture? ⇒ Boolean
137
138
139
140
141
142
143
|
# File 'lib/mediafire/store_object.rb', line 137
def is_picture?
if @filetype == 'image'
true
else
false
end
end
|
#name ⇒ Object
151
152
153
|
# File 'lib/mediafire/store_object.rb', line 151
def name
@name
end
|
#protected? ⇒ Boolean
163
164
165
166
167
168
169
|
# File 'lib/mediafire/store_object.rb', line 163
def protected?
if @password_protected == 'yes'
true
else
false
end
end
|
#quick_key ⇒ Object
Also known as:
quickkey, key
145
146
147
|
# File 'lib/mediafire/store_object.rb', line 145
def quick_key
@key
end
|
#size ⇒ Object
155
156
157
|
# File 'lib/mediafire/store_object.rb', line 155
def size
@size
end
|