Class: Dragonfly::Model::Attachment::ConfigProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly/model/attachment_class_methods.rb

Instance Method Summary collapse

Constructor Details

#initialize(spec, block) ⇒ ConfigProxy

Returns a new instance of ConfigProxy.



8
9
10
11
# File 'lib/dragonfly/model/attachment_class_methods.rb', line 8

def initialize(spec, block)
  @spec = spec
  instance_eval(&block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object (private)



48
49
50
51
52
53
54
# File 'lib/dragonfly/model/attachment_class_methods.rb', line 48

def method_missing(meth, *args, &block)
  if key = meth.to_s[/^storage_(.*)$/, 1]
    raise NoMethodError, "#{meth} is deprecated - use storage_options{|a| {#{key}: ...} } instead"
  else
    super
  end
end