suits 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/suits.rb +34 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Njc4MTBlYTZmYzQ4ZDU5M2ZiNDE0Mzg4NDIxOWVhMDU1NjQ1Mjc1YQ==
5
+ data.tar.gz: !binary |-
6
+ MWQ3NDc2MzgwYTNhNDhmNTU0MGI4MGE0Y2E2YjVhZDczZDNlNDBiYg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NWUzZGUzM2ZmMmRjNWJlNTY3NTBkNWNhN2M2YzYzMjhiMmQ1NTQ4MzBlNjJk
10
+ YWY5ODlhOWU0ZWNkNjE3NmE0YzFiY2IxY2U2ZDZjM2M3YzkwMDcxNTA4ZWY1
11
+ OWVlYTQzYWYzMTJmY2M2OGVlNTViZDU1MDMyYzFkYWQ0Nzc1MDc=
12
+ data.tar.gz: !binary |-
13
+ Y2YzMmJkNzhlZTc3NTJjYTVjMTFlMWI1NTE4MzQ0Nzk4ZmUzM2NiM2UxYjA5
14
+ NWQxNjUyYWU4NTRkYmZkZDViOTFlNmZkM2JkYzZkMTExOGJjM2M1OGRmMDgw
15
+ NDBkODczYjNkMDEyNDlhMjg3YWQ1OTQ5OWNkNWU5OGVmMmVmODM=
data/lib/suits.rb ADDED
@@ -0,0 +1,34 @@
1
+ class SUITS
2
+
3
+ require 'htmlentities'
4
+
5
+ def self.spade(params = {})
6
+ string = params[:solid] ? '♠' : '♤'
7
+ decode(string)
8
+ end
9
+
10
+ def self.heart(params = {})
11
+ string = params[:solid] ? '♥' : '♡'
12
+ decode(string)
13
+ end
14
+
15
+ def self.diamond(params = {})
16
+ string = params[:solid] ? '♦' : '♢'
17
+ decode(string)
18
+ end
19
+
20
+ def self.club(params = {})
21
+ string = params[:solid] ? '♣' : '♧'
22
+ decode(string)
23
+ end
24
+
25
+ private
26
+
27
+ def self.decode(string)
28
+ HTMLEntities.new.decode(string)
29
+ end
30
+ end
31
+
32
+
33
+
34
+
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: suits
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Will Bendix
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-09-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Easy printing of suit symbols onto command line applications
14
+ email: wcbendix@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/suits.rb
20
+ homepage: http://rubygems.org/gems/suits
21
+ licenses: []
22
+ metadata: {}
23
+ post_install_message:
24
+ rdoc_options: []
25
+ require_paths:
26
+ - lib
27
+ required_ruby_version: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ! '>='
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ required_rubygems_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ requirements: []
38
+ rubyforge_project:
39
+ rubygems_version: 2.0.3
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: Card Suits
43
+ test_files: []