Module: Shrine::Plugins::AddMetadata::ClassMethods

Defined in:
lib/shrine/plugins/add_metadata.rb

Instance Method Summary collapse

Instance Method Details

#add_metadata(name = nil, **options, &block) ⇒ Object


12
13
14
15
16
# File 'lib/shrine/plugins/add_metadata.rb', line 12

def (name = nil, **options, &block)
  opts[:add_metadata][:definitions] << [name, options, block]

  (name) if name
end

#metadata_method(*names) ⇒ Object


18
19
20
# File 'lib/shrine/plugins/add_metadata.rb', line 18

def (*names)
  names.each { |name| (name) }
end