GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
technoweenie (author)
Tue Oct 10 10:10:26 -0700 2006
commit  971b848af131435d946917d4afdf6a8cbde49f48
tree    3bd7812c90c6ad2aefad56183c164352bdeb391f
parent  30dd979891ea3c8aa8e536c6b34c045cbeb196df
mephisto / app / drops / asset_drop.rb
100644 16 lines (12 sloc) 0.352 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class AssetDrop < BaseDrop
  liquid_attributes.push(*[:content_type, :size, :filename, :width, :height])
 
  [:image, :movie, :audio, :other, :pdf].each do |content|
    define_method("is_#{content}") { @source.send("#{content}?") }
  end
  
  def tags
    @tags ||= liquify *@source.tags
  end
 
  def path
    @path = @source.public_filename
  end
end