random_cases 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: b6fcfe446a87b7ad4c2db1345f2d0f8797945f41
4
- data.tar.gz: 2901db8f10b7f159d2564a0d5c160a827d2f0304
3
+ metadata.gz: c192cee875514ffb4230e0e9a82da744dfd4ecc5
4
+ data.tar.gz: 879126bc6dabf092f8722b32c38896a5b1f19c8d
5
5
  SHA512:
6
- metadata.gz: 4b368946d8eb2c135ec83b3669668e4342bdfee516efc4c67ab3fa0b8888a0b02db520b8b7e2f032da0ea0e88acf61337ebd2bf2c2c6cfe8536eade08bf0cdb5
7
- data.tar.gz: 892ab5359fd6a43c6dbc3db32c28a3611551a7cfad4b93aa7f7903cce367cb65d2f8f8d24903b75468a568e2c1902a52146f68a8c3b46e5711c3da6f94f38a30
6
+ metadata.gz: 2da6070898c2f841b46c2bd68b553522c43b296ab27996ba40f5bc4a15d975e0ee6c31a643647d311b2b840f075022e43f6d9f9e45f74780756590b97b6b4750
7
+ data.tar.gz: a06fa343610c2b3b36fa89581423f02b4bc2e01b8c4fa49365dd01940c9c9e3e5d434dfa9cdf18b5254ae9c46142f6613fa2444c6dcd28121656c42ca7453677
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # RandomCases
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/random_cases`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Simple implementation of String method for randomizing characters in string or text
6
4
 
7
5
  ## Installation
8
6
 
@@ -10,6 +8,8 @@ Add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
12
10
  gem 'random_cases'
11
+ or
12
+ gem 'random_cases', '~> 0.2.0'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -22,7 +22,34 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ <h1>Ruby Random Cases</h1>
26
+ <br/>
27
+ <b>Regular:</b> Some simple text
28
+
29
+ <b>Converted:</b> soMe SimpLE tExT
30
+ <h2>Usage</h2>
31
+ Calling <b>.random_cases</b> string method on any string
32
+ "Some simple text".<b>random_cases</b>
33
+
34
+ class HomeController < ApplicationController<br/>
35
+ def index<br/>
36
+ @cool= "Some simple text"<br/>
37
+ @random = "Some simple text".<b>random_cases</b><br/>
38
+ end<br/>
39
+ end<br/>
40
+ <br/>
41
+
42
+ <h2>Method implementation</h2>
43
+
44
+ class String
45
+
46
+ def random_cases
47
+
48
+ self.gsub(/./){ |c| rand(2)>0 ? c : c.swapcase }
49
+
50
+ end
51
+
52
+ end
26
53
 
27
54
  ## Development
28
55
 
@@ -1,3 +1,3 @@
1
1
  module RandomCases
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random_cases
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zirexba