Sha256: 09417d758cf4ecc3048785a123fc9f6a3f602c69aec271cb33eb7079b11dda51

Contents?: true

Size: 304 Bytes

Versions: 19

Compression:

Stored size: 304 Bytes

Contents

class BasePresenter < SimpleDelegator
  attr_reader :item

  protected

	  def initialize(item, *args)
	    @item = item
	    __setobj__(item)
	  end

	  def self.wrap(collection)
	    collection.all.collect { |model| self.new(model) }
	  end

	  def helpers
	  	ApplicationController.helpers
	  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
jera_push-2.1.4 app/presenters/base_presenter.rb
jera_push-2.1.3 app/presenters/base_presenter.rb
jera_push-2.1.2 app/presenters/base_presenter.rb
jera_push-2.0.0 app/presenters/base_presenter.rb
jera_push-1.2.4 app/presenters/base_presenter.rb
jera_push-1.2.3 app/presenters/base_presenter.rb
jera_push-1.2.1 app/presenters/base_presenter.rb
jera_push-1.1.7 app/presenters/base_presenter.rb
jera_push-1.1.6 app/presenters/base_presenter.rb
jera_push-1.1.5 app/presenters/base_presenter.rb
jera_push-1.1.4 app/presenters/base_presenter.rb
jera_push-1.1.3 app/presenters/base_presenter.rb
jera_push-1.1.2 app/presenters/base_presenter.rb
jera_push-1.1.1 app/presenters/base_presenter.rb
jera_push-1.1.0 app/presenters/base_presenter.rb
jera_push-1.0.3 app/presenters/base_presenter.rb
jera_push-1.0.2 app/presenters/base_presenter.rb
jera_push-1.0.1.1 app/presenters/base_presenter.rb
jera_push-1.0.1 app/presenters/base_presenter.rb