pres 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pres/presenter.rb +8 -3
- data/lib/pres/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56f81f8f4780bf77547fd95e4a887096ce5cf826
|
4
|
+
data.tar.gz: 7a38a3d761ad8614b04fa208911bf84e64b9a507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6f6ab94d54b811eaadaffcef217552109a1431692b82f435c43542fc54e21688c2e5aa039f4bff8422dce76e9937b64538094d28afb7c4aeb233d1f9e9b0452
|
7
|
+
data.tar.gz: a11d34d228f17a2786c041f7243acd0ddf30ceec3dc567555a687ce084fd3477146fb8edaa83a45806b3d6091d944aebe9345b40556f42370f85e83d656515cb
|
data/lib/pres/presenter.rb
CHANGED
@@ -2,18 +2,23 @@
|
|
2
2
|
# Construct with object, view_context, and optional options
|
3
3
|
module Pres
|
4
4
|
class Presenter
|
5
|
-
extend Forwardable
|
6
5
|
include Presents
|
7
6
|
include ViewDelegation
|
8
7
|
|
9
8
|
attr_reader :object, :options
|
10
9
|
|
11
|
-
def_delegators :object, :id, :to_partial_path
|
12
|
-
|
13
10
|
def initialize(object, view_context = nil, options = {})
|
14
11
|
@object = object
|
15
12
|
@view_context = view_context
|
16
13
|
@options = options
|
17
14
|
end
|
15
|
+
|
16
|
+
def id
|
17
|
+
object.id
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_partial_path
|
21
|
+
object.to_partial_path
|
22
|
+
end
|
18
23
|
end
|
19
24
|
end
|
data/lib/pres/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tee Parham
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03-
|
12
|
+
date: 2017-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|