Public Instance methods
define_entity_methods(name)
[show source]
# File lib/shrine/plugins/derivatives.rb 30 def define_entity_methods(name) 31 super if defined?(super) 32 33 define_method(:"#{name}_derivatives") do |*args| 34 send(:"#{name}_attacher").get_derivatives(*args) 35 end 36 end
define_model_methods(name)
[show source]
# File lib/shrine/plugins/derivatives.rb 38 def define_model_methods(name) 39 super if defined?(super) 40 41 define_method(:"#{name}_derivatives!") do |*args, **options| 42 send(:"#{name}_attacher").create_derivatives(*args, **options) 43 end 44 end