Sha256: 490b6bfd7bb036783fa99ebf042e98d9dd99a923951eb9630335b62a1780c62a

Contents?: true

Size: 280 Bytes

Versions: 15

Compression:

Stored size: 280 Bytes

Contents

module Garage::ResourceCastingResponder
  def initialize(*args)
    super
    @caster = Garage.configuration.cast_resource
  end

  def display(resource, given_options={})
    if @caster
      resource = @caster.call(resource)
    end
    super(resource, given_options)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
the_garage-2.4.4 lib/garage/resource_casting_responder.rb
the_garage-2.4.3 lib/garage/resource_casting_responder.rb
the_garage-2.4.2 lib/garage/resource_casting_responder.rb
the_garage-2.4.1 lib/garage/resource_casting_responder.rb
the_garage-2.4.0 lib/garage/resource_casting_responder.rb
the_garage-2.3.3 lib/garage/resource_casting_responder.rb
the_garage-2.3.2 lib/garage/resource_casting_responder.rb
the_garage-2.3.1 lib/garage/resource_casting_responder.rb
the_garage-2.3.0 lib/garage/resource_casting_responder.rb
the_garage-2.2.0 lib/garage/resource_casting_responder.rb
the_garage-2.1.0 lib/garage/resource_casting_responder.rb
the_garage-2.0.3 lib/garage/resource_casting_responder.rb
the_garage-2.0.2 lib/garage/resource_casting_responder.rb
the_garage-2.0.1 lib/garage/resource_casting_responder.rb
the_garage-2.0.0 lib/garage/resource_casting_responder.rb