Class: Dragonfly::ActiveModelExtensions::Attachment::ConfigProxy
- Defined in:
- lib/dragonfly/active_model_extensions/attachment_class_methods.rb
Instance Method Summary collapse
-
#initialize(spec, block) ⇒ ConfigProxy
constructor
A new instance of ConfigProxy.
Constructor Details
#initialize(spec, block) ⇒ ConfigProxy
Returns a new instance of ConfigProxy.
8 9 10 11 |
# File 'lib/dragonfly/active_model_extensions/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)
58 59 60 61 62 63 64 |
# File 'lib/dragonfly/active_model_extensions/attachment_class_methods.rb', line 58 def method_missing(meth, *args, &block) if meth.to_s =~ /^storage_(.*)$/ storage_opt($1.to_sym, args.first, &block) else super end end |