module Shrine::Plugins::AddMetadata::ClassMethods

  1. lib/shrine/plugins/add_metadata.rb

Methods

Public Instance

  1. add_metadata
  2. metadata_method

Public Instance methods

add_metadata (name = nil, &block)
[show source]
# File lib/shrine/plugins/add_metadata.rb, line 42
def add_metadata(name = nil, &block)
  if name
    opts[:metadata] << _metadata_proc(name, &block)
    metadata_method(name)
  else
    opts[:metadata] << block
  end
end
metadata_method (*names)
[show source]
# File lib/shrine/plugins/add_metadata.rb, line 51
def metadata_method(*names)
  names.each { |name| _metadata_method(name) }
end