aga-message 0.0.2 ā†’ 0.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
  SHA256:
3
- metadata.gz: 4810d922674d6b4e9fed3b5741362cc1641a3153549de9967f2986b871e26fe1
4
- data.tar.gz: 8dd0ec14a5c72f24dab3cab0b669687eff9bf75d8da98bc7c78e1556246aa279
3
+ metadata.gz: 7b2f525f436d717fa6d0f7d5f8dd4717ca085a8b7c14a52dd75b602f6b8ae99c
4
+ data.tar.gz: 1b81ebbd8cba1d23ebeeb8263b1bb230d71f6ccaace7a1908f4622f8cb6268cb
5
5
  SHA512:
6
- metadata.gz: 273f4b334ac76b789cfdf2ad17075f8d2c8bfbbf62d43e3c0defe0795280ba4fcab58ac02a5741173a7bb86c5f287547a858044f4727a81b46a8260b686061f4
7
- data.tar.gz: 8c75b961f95cc7e591f2dd0b999d337efc5759f53fd228176a12dcc242d53a1f3b588429ea1db0c96a97ba15e462e1a366487d2f656f69e6f8083d2ed6234f2d
6
+ metadata.gz: 5c9177f212a097e49a319dbb0f926549f9e34869a29f2e66b6af3873f0b55d098cf29de7a2e00637049b5928e4d7709d2a73373ad44a92f678e2315c4dd98f59
7
+ data.tar.gz: e529757145161d597fbc1068c938ceddcfb2e85798078c6e87030274e9fb6827e0f973f9a6931a8742ff5e2c4383bffc72b10b3a8d24660a150aec5e7550311c
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Aga-message
2
2
 
3
- Aga-telegram is a Ruby gem that provides a convenient way to format messages to be sent to customers. It offers a set of utilities and methods to compose and customize messages before sending them to clients through various communication channels.
3
+ Aga-message is a Ruby gem that provides a convenient way to format messages to be sent to customers. It offers a set of utilities and methods to compose and customize messages before sending them to clients through various communication channels.
4
+
4
5
 
5
6
  ## Features
6
7
 
@@ -59,6 +60,22 @@ Message.configuration
59
60
  }
60
61
  ]
61
62
 
63
+ response = Message::Helpers::Dissipator.new(result: result, service: :new, count: 2).run
64
+
65
+ # Output: response
66
+
67
+ {
68
+ :result => [
69
+ "šŸ¤‘<b>MOVEMENT 3/06</b> šŸ¤‘\n\nCrypto: <b>Bitcoin (BTC)</b>\nšŸ”: <b>Exchanges: </b>\nExchange 1 - BTC/USDT\nExchange 2 - BTC/USDT\n ========================== \n
70
+
71
+ šŸ¤‘<b>MOVEMENT 4/06</b> šŸ¤‘\n\nCrypto: <b>Ethereum (ETH)</b>\nšŸ”: <b>Exchanges: </b>\nExchange 1 - ETH/USDT\nExchange 2 - ETH/USDT\n ========================== \n
72
+
73
+ šŸ¤‘<b>MOVEMENT 5/06</b> šŸ¤‘\n\nCrypto: <b>Xrp (XRP)</b>\nšŸ”: <b>Exchanges: </b>\nExchange 1 - XRP/USDT\nExchange 2 - XRP/USDT"
74
+ ],
75
+ :count => 5
76
+ }
77
+
78
+ This output is to be considered without spaces
62
79
 
63
80
  ```
64
81
 
@@ -98,5 +115,3 @@ By obtaining a copy of this software and associated documentation files (the "So
98
115
  5. Governing Law
99
116
 
100
117
  5.1 This license shall be governed by and construed in accordance with the laws of Italy, without regard to its conflict of laws principles.
101
-
102
- By using the Software, you acknowledge that you have read and understood this license agreement and agree to be bound by its terms and conditions.
@@ -41,7 +41,8 @@ module Message
41
41
  end
42
42
 
43
43
  def last_count
44
- @count + 1
44
+ @count = (@count || 0) + 1
45
+ @count
45
46
  end
46
47
 
47
48
  attr_accessor :last_updated
@@ -30,7 +30,7 @@ module Message
30
30
  def many_messages
31
31
  messages = @result.each_slice(10).map do |slice|
32
32
  slice.map do |element|
33
- Object.const_get(service_class).new(result: element, count: @count).run.tap do
33
+ Object.const_get(service_class).new(result: element, count: ( @count || 0)).run.tap do
34
34
  @count += 1
35
35
  end
36
36
  end.join("\n ========================== \n")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Message
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aga-message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Baldazzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-05 00:00:00.000000000 Z
11
+ date: 2023-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -221,5 +221,5 @@ requirements: []
221
221
  rubygems_version: 3.3.24
222
222
  signing_key:
223
223
  specification_version: 4
224
- summary: aga-message0.0.2
224
+ summary: aga-message0.0.4
225
225
  test_files: []