lolbaser 0.1.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/lolbaser.rb +36 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 07d4f2b0a5cbba7dffe26deea7979d6a779bbe46
|
4
|
+
data.tar.gz: cb8d13172d5500e5c4e56eee2bc120908ef5c1b9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 49a469e6c125932efa2f1945d3662b0aef97fdaf4dc51e5f9c6512ea5a7dea26f0e327e4a1b5e3c98d553e939ed8d427e2873a124f964f220ca28d6f3057fbc2
|
7
|
+
data.tar.gz: acd45af5c43c8ee708cfb446da32b651c793abfe418406d36abd20920d07b69c99f243de9d63f211103179f5e59c26ce11fe80d423cb76b5099c025c63e4a027
|
data/lib/lolbaser.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
module LolBaser
|
2
|
+
LOL = ["l", "o", "l"]
|
3
|
+
|
4
|
+
class Lol
|
5
|
+
def initialize n=0
|
6
|
+
@n = n
|
7
|
+
return self
|
8
|
+
end
|
9
|
+
|
10
|
+
def get n=nil
|
11
|
+
@n = n unless n != nil
|
12
|
+
return self
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.get n
|
16
|
+
n = n.to_i
|
17
|
+
return Lol.new(n)
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_i n=nil
|
21
|
+
return Lol.to_i(n) if n != nil
|
22
|
+
return Lol.to_i(@n)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.to_i n
|
26
|
+
n = n.to_i
|
27
|
+
out = ""
|
28
|
+
while n >= 3
|
29
|
+
lol = rand 0..2
|
30
|
+
n -= 2**lol
|
31
|
+
out << LolBaser::LOL[lol]
|
32
|
+
end
|
33
|
+
out << LolBaser::LOL[n - 1] if n > 0
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lolbaser
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- poulet_a
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-02 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A lolbaser counter
|
14
|
+
email:
|
15
|
+
- poulet_a@epitech.eu
|
16
|
+
- - lib/lolbaser.rb
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/lolbaser.rb
|
22
|
+
homepage: https://github.com/Sophen/lolgem
|
23
|
+
licenses:
|
24
|
+
- GNU/GPLv3
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.2.2
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: Lol init
|
46
|
+
test_files: []
|
47
|
+
has_rdoc:
|