bourgeois 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5869471a07dcb6bc5f57f478de63ff06b4d4bf5a
4
- data.tar.gz: 750e2123766395e20d65c1c53ec6ae6b5ae464df
3
+ metadata.gz: 21f5d2e5370c18e3a9483713304492e75584dea1
4
+ data.tar.gz: 092d1dc63148b27d14c1976b50042e3ff1d1a27c
5
5
  SHA512:
6
- metadata.gz: 0658e2b88a38375914022c651a9ec4c2edebf46cef6409f104ace0e62896774482fb8e0c17ff592bd7a87d9c9b74a1ee3a22a68546f8adc3524a22a06935a231
7
- data.tar.gz: 90abbc8eb9b200279f7839cdb2dffbbcd29d848c40799379cb6fe22bb22e1a333770cdc1b8483fe7d601354cfa8390c7ad2c3e8aa07592bdcdef2d3a7b0c777c
6
+ metadata.gz: ab8ce7c816a126193dce558fe8a2cea7dd12d6cc669e41e817cc150a7168a6548a10d892960530bd7cb1bfb827892606303ca01208854af2d2f273988422d1a1
7
+ data.tar.gz: d6bf0949d6bc7ff412e71d7ed336f2d8584336456b1bb7a5cfe46f1b1004f9ffe1d09f24c1637577739fca471f9d043d179d0e451d99697edcf2f04d749b7b52
@@ -54,7 +54,7 @@ module Bourgeois
54
54
  # puts user.inspect # => #<UserPresenter object=#<User name="Remi>>
55
55
  # puts user.name # => Remi
56
56
  # end
57
- def self.present(object, klass = nil, &blk)
57
+ def self.present(object, klass = nil, view = nil, &blk)
58
58
  return if object.nil?
59
59
  return object.map { |o| present(o, klass, &blk) } if object.respond_to?(:to_a) && !object.is_a?(Struct)
60
60
 
@@ -64,7 +64,7 @@ module Bourgeois
64
64
  klass ||= presenter_class(object)
65
65
  end
66
66
 
67
- presenter ||= klass.new(object, self)
67
+ presenter ||= klass.new(object, view)
68
68
  yield presenter if block_given?
69
69
 
70
70
  presenter
@@ -1,3 +1,3 @@
1
1
  module Bourgeois
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module Bourgeois
2
2
  module ViewHelper
3
3
  def present(object, klass = nil, &blk)
4
- Bourgeois::Presenter.present(object, klass, &blk)
4
+ Bourgeois::Presenter.present(object, klass, self, &blk)
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bourgeois
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rémi Prévost