luiz_test 0.0.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 +7 -0
- data/lib/luiz_test.rb +14 -0
- metadata +43 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 035ecb10b0a9404b5319b487815f4770ba5a938baa8e6bcf3dace89cefb7b420
|
4
|
+
data.tar.gz: 648ae535746847b672ba63669d904cd1982fe4c6155dd23bea260471470df443
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fce632e3179cc78facd671f7143af6299498df89bc852901adfcb03e60b0f9a58605b348d5d6701a77467b4bc77e7f598c132ec4caffa29fc549312604049ba5
|
7
|
+
data.tar.gz: 11eefbf3b2dbd5426947783ead49810eaaf3388ffb90dc61dd2889f5ace71367092b5b5942bcd158939cdf7b53383f719fc20a2837e88e08d9cb0219cfda0200
|
data/lib/luiz_test.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "damerau-levenshtein"
|
4
|
+
|
5
|
+
class LuizTest
|
6
|
+
def self.distance_to(a, b)
|
7
|
+
raise ErrorStringNil.new "cannot compare to NilClass" if a.to_s.strip.empty?
|
8
|
+
raise ErrorStringNil.new "cannot compare to NilClass" if b.to_s.strip.empty?
|
9
|
+
return yield(a, b) if block_given?
|
10
|
+
DamerauLevenshtein.distance(a, b)
|
11
|
+
end
|
12
|
+
|
13
|
+
class ErrorStringNil < StandardError; end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: luiz_test
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Luiz Benevenuto
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple hello world gem
|
14
|
+
email: luiz.benevenuto@bairesdev.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/luiz_test.rb
|
20
|
+
homepage: https://rubygems.org/gems/luiz_test
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubygems_version: 3.2.15
|
40
|
+
signing_key:
|
41
|
+
specification_version: 4
|
42
|
+
summary: Ola!
|
43
|
+
test_files: []
|