base_presenter 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ module ApplicationHelper
2
+ def present(object, klass = nil)
3
+ klass ||= "#{object.class}Presenter".constantize
4
+ presenter = klass.new(object, self)
5
+
6
+ yield presenter if block_given?
7
+ return presenter
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  class BasePresenter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require "base_presenter/version"
2
+ require "application_helper"
2
3
 
3
4
  class BasePresenter
4
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -56,6 +56,7 @@ files:
56
56
  - README.md
57
57
  - Rakefile
58
58
  - base_presenter.gemspec
59
+ - lib/application_helper.rb
59
60
  - lib/base_presenter.rb
60
61
  - lib/base_presenter/version.rb
61
62
  homepage: https://github.com/raglub/base_presenter