Sha256: 46d1825d44b9daa17a7896b1cff3e0ac39b49fc31899cea77566e61fdf17e712
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
module PaperclipPrivate module Interpolations def self.extended(base) base.instance_eval do ::PaperclipPrivate::Interpolations.instance_methods(false).each { |m| define_method(m, self.method(m)) } end end # Returns the style, or the default style if nil is supplied. def privacy(attachment, style_name) attachment.options[:privacy] end # Returns the class name without pluarlizing it. def klass(attachment, style_name) attachment.instance.class end # Returns the attachment name without pluralizing it def attachment_singular(attachment, style_name) attachment.name end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
paperclip_private-0.0.2 | lib/paperclip_private/interpolations.rb |