class Shrine::Derivation::Command

  1. lib/shrine/plugins/derivation_endpoint.rb
Superclass: Object

Methods

Public Class

  1. delegate
  2. new

Public Instance

  1. derivation

Attributes

Public Class methods

delegate(*names)

Creates methods that delegate to derivation parameters.

[show source]
    # File lib/shrine/plugins/derivation_endpoint.rb
283 def self.delegate(*names)
284   names.each do |name|
285     protected define_method(name) {
286       if [:name, :args, :source].include?(name)
287         derivation.public_send(name)
288       else
289         derivation.option(name)
290       end
291     }
292   end
293 end
new(derivation)
[show source]
    # File lib/shrine/plugins/derivation_endpoint.rb
278 def initialize(derivation)
279   @derivation = derivation
280 end