hexcolor 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/hexcolor.rb +10 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ec3c74d54d326ed8ca19547ea2e3bce83590549a
4
+ data.tar.gz: 18245e44178edc67bf2cdf34b963e49a627cf1f1
5
+ SHA512:
6
+ metadata.gz: 7b35c319a3056589764a79de780c909e4ec86b1150accb3891fd0825265af099696912a57eb640535654166fd785e98a81a49ec1c993fcea1b899dd9476b1a5c
7
+ data.tar.gz: 326068eaa6ab7fea18d908730b3adc3d8675308ac373d9679b094dfb97ee21f9f902398830737a146660bcc8789ed8ddf44337e5faf69f8ea5528a67378762b4
@@ -0,0 +1,10 @@
1
+ class Hexcolor
2
+ def self.random_color
3
+ array = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']
4
+ color = ''
5
+ while color.length < 6
6
+ color += array.sample
7
+ end
8
+ return color
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hexcolor
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Raghu Srinivasan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Hexcolor generates a random hex color
14
+ email: raghu.srinivasan@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/hexcolor.rb
20
+ homepage: http://github.com/raghus
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
+ rubyforge_project:
40
+ rubygems_version: 2.1.10
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Hexcolor generates a random hex color
44
+ test_files: []