Class: Mediafire::StoreObject
- Inherits:
-
Object
- Object
- Mediafire::StoreObject
- Defined in:
- lib/mediafire/store_object.rb
Direct Known Subclasses
Instance Method Summary collapse
- #data(d) ⇒ Object
- #date ⇒ Object
- #description ⇒ Object
-
#initialize(d) ⇒ StoreObject
constructor
A new instance of StoreObject.
- #is_folder? ⇒ Boolean
- #is_public? ⇒ Boolean
- #tags ⇒ Object
Constructor Details
#initialize(d) ⇒ StoreObject
Returns a new instance of StoreObject.
3 4 5 |
# File 'lib/mediafire/store_object.rb', line 3 def initialize(d) data(d) end |
Instance Method Details
#data(d) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/mediafire/store_object.rb', line 7 def data(d) @created = d['created'] || '' @tags = d['tags'] || '' @description = d['desc'] || '' @privacy = d['privacy'] || '' end |
#date ⇒ Object
22 23 24 |
# File 'lib/mediafire/store_object.rb', line 22 def date @created end |
#description ⇒ Object
30 31 32 |
# File 'lib/mediafire/store_object.rb', line 30 def description @description end |
#is_folder? ⇒ Boolean
14 15 16 17 18 19 20 |
# File 'lib/mediafire/store_object.rb', line 14 def is_folder? if @data.key?('folder_key') true else false end end |
#is_public? ⇒ Boolean
34 35 36 37 38 39 40 |
# File 'lib/mediafire/store_object.rb', line 34 def is_public? if @privacy == 'public' true else false end end |
#tags ⇒ Object
26 27 28 |
# File 'lib/mediafire/store_object.rb', line 26 def @tags end |