tramway 0.2.1 → 0.2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4278abe2405f3788a77844c7bd0bb6afe25e8f14feb8d2587b5c7c4ce2d8563f
4
- data.tar.gz: 68872e25d9a868ea13cd791f060a2bc0fad80bc31e5cae6c7d071e1cbfd5ed05
3
+ metadata.gz: f21d3c15fcbad670039714c4661be3546849982618662fec4de88d5fa7f46ce3
4
+ data.tar.gz: ed77adc5f2247c5db97e23b0c6706219689afcbbedd02db3597d2e31f1adde23
5
5
  SHA512:
6
- metadata.gz: 6195c4bb13401cfd3b0d518fd4952f53f0e0cfab13f9fc1ede6bcf9a17b52e7d966773635fcd718b5ce71cad18f6632c858ef183a110c12b10957cbce684b5f1
7
- data.tar.gz: f7b12ede11f475da4f441cefd5ca7e91cb1d6df4e7fb51d489b88f30f37917ba6d3cadecda826a49d8559ecc92d93c7ad94e049f8b48d226c247ed920bb808cf
6
+ metadata.gz: 58c2ce7f3f93ae17fd399d1fff01e0abce89f0a687aba960d5431be777f2ec2ae0078d68d9f9bdffadedce5b67004a4a487a30ad29e09e7927fb1b808a83843c
7
+ data.tar.gz: 2b1ff7fa17dfb4e8eed897bdaab83b32a58f0230a12a24d2bf37f9334779d7abf180949d50444b0e75623efd9db10a9b116d231a923b16efbb6af507d218a17b
@@ -22,7 +22,11 @@ module Tramway
22
22
  class << self
23
23
  def decorate(object_or_array, context)
24
24
  if Tramway::Decorators::CollectionDecorators.collection?(object_or_array)
25
- Tramway::Decorators::CollectionDecorators.decorate_collection(collection: object_or_array, context:)
25
+ Tramway::Decorators::CollectionDecorators.decorate_collection(
26
+ collection: object_or_array,
27
+ context:,
28
+ decorator: self
29
+ )
26
30
  else
27
31
  new(object_or_array, context)
28
32
  end
@@ -7,9 +7,9 @@ module Tramway
7
7
  module CollectionDecorators
8
8
  module_function
9
9
 
10
- def decorate_collection(collection:, context:)
10
+ def decorate_collection(collection:, context:, decorator:)
11
11
  collection.map do |item|
12
- Tramway::Decorators::BaseDecorator.decorate item, context
12
+ decorator.decorate item, context
13
13
  end
14
14
  end
15
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme