Sha256: afc58bda33159767db57a43832e8a6a601fa7342f6302812a13b15532dba3756

Contents?: true

Size: 290 Bytes

Versions: 7

Compression:

Stored size: 290 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, @options)
    end
    super(resource, given_options)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
the_garage-2.8.2 lib/garage/resource_casting_responder.rb
the_garage-2.8.1 lib/garage/resource_casting_responder.rb
the_garage-2.8.0 lib/garage/resource_casting_responder.rb
the_garage-2.7.0 lib/garage/resource_casting_responder.rb
the_garage-2.6.1 lib/garage/resource_casting_responder.rb
the_garage-2.6.0 lib/garage/resource_casting_responder.rb
the_garage-2.5.0 lib/garage/resource_casting_responder.rb