flame-flash 2.3.0 → 2.3.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/flame/flash_array.rb +11 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1575358217da8586e660d5bcf891339c731dee1b
4
- data.tar.gz: 9b8e1c0730cfefdcf02c53ecb90fb7ea73613436
3
+ metadata.gz: 15ec5eafd3c1f0c0795ca3f5794eeede417eaec0
4
+ data.tar.gz: 3b4d042da4f761a02e0d35c6ed70e61437cfa752
5
5
  SHA512:
6
- metadata.gz: c65c23089751bea42ab1b16779882071cf00a266ff16b50ac709ac6861ceec9329f4c03dffc902102e7bb26f8980aa003ff669883abf255ba574b97a4319b9af
7
- data.tar.gz: d9bb3a384aae72a06688161d9ecfde81914f2c53af0b28419380a4bf038d035d821ec1f79d6f30dab1e6f7d92d1a04539d50ebf02c939dceedc8dc79d5114060
6
+ metadata.gz: 69374426d41ae6bbea6538e7fd40c7c52e4cf12e358442c7261e503c5c8e639a73564dbd701bbabcd572e416067ec4b1c13235773a39165e6b7197e12af9bd27
7
+ data.tar.gz: 302830761a9bb393c7224d2cf638597999b0ae4982a21716676b1815ad45091037b8a155391432a24e55833083a3f03ac5c3bf32fddc35e3d66add2cbc8084e6
@@ -10,6 +10,7 @@ module Flame
10
10
  # as an initialization variable.
11
11
  def initialize(session, parent = nil, scope = nil)
12
12
  @now = session || []
13
+ fix_messages_as_array
13
14
  @next = []
14
15
  @parent = parent || self
15
16
  @scope = scope
@@ -59,6 +60,16 @@ module Flame
59
60
  def condition(hash, options = {}) # kind, section)
60
61
  options.reject { |key, val| hash[key] == val || val.nil? }.empty?
61
62
  end
63
+
64
+ def fix_messages_as_array
65
+ @now.each do |hash|
66
+ next unless hash[:text].is_a?(Array)
67
+ hash_with_arr = @now.delete(hash)
68
+ hash_with_arr[:text].each do |text|
69
+ @now.push(hash_with_arr.merge(text: text))
70
+ end
71
+ end
72
+ end
62
73
  end
63
74
  end
64
75
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame-flash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov