class CloudappExport::Item
Attributes
attributes[R]
Public Class Methods
new(attributes)
click to toggle source
# File lib/cloudapp_export/item.rb, line 5 def initialize(attributes) @attributes = attributes end
Public Instance Methods
[](key)
click to toggle source
# File lib/cloudapp_export/item.rb, line 9 def [](key) @attributes[key] end
filename()
click to toggle source
# File lib/cloudapp_export/item.rb, line 17 def filename ext = @attributes['name'].split('.').last "#{@attributes['slug']}.#{ext}" end
name()
click to toggle source
# File lib/cloudapp_export/item.rb, line 13 def name @attributes['name'] end