quotinator 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/quotinator.rb +25 -0
  2. metadata +47 -0
data/lib/quotinator.rb ADDED
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+
3
+ class Quotinator
4
+
5
+ def self.about
6
+ puts "This is a basic gem which is designed to replace all "
7
+ puts "the special and fancy characters Microsoft places in "
8
+ puts "its text with the basic counterparts."
9
+ end
10
+
11
+ def self.replace(txt)
12
+ txt.gsub!(/”/,'"')
13
+ txt.gsub!(/“/,'"')
14
+ txt.gsub!(/’/,"'")
15
+ txt.gsub!(/‘/,"'")
16
+ txt.gsub!(/…/,"...")
17
+ txt.gsub!(/ /," ")
18
+ txt.gsub!(/—/,"-")
19
+ # There seems to be two different sets of special quotes.
20
+ txt.gsub!(/”/,'"')
21
+ txt.gsub!(/“/,'"')
22
+ return txt
23
+ end
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: quotinator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - ! '["Eric Roberts"]'
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-08-01 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A simple gem to replace the special character from Microsoft products
15
+ to their basic equivalents.
16
+ email: eric@ercubed.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/quotinator.rb
22
+ homepage: http://rubygems.org/gems/quotinator
23
+ licenses:
24
+ - MIT
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 1.8.25
44
+ signing_key:
45
+ specification_version: 3
46
+ summary: The Quotinator!
47
+ test_files: []