convertcurrency 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/convertcurrency.rb +43 -0
- metadata +45 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
module LimitedCurrency
|
2
|
+
|
3
|
+
#This funtion converts Euro to All the currencies given below
|
4
|
+
#
|
5
|
+
def self.conversion(name,value)
|
6
|
+
@name = name
|
7
|
+
@value = value
|
8
|
+
|
9
|
+
if name == "USD" #Euro to US Dollar
|
10
|
+
newCurrency = (value.to_i*1.37)
|
11
|
+
elsif name == "PND" #Euro to British Pound
|
12
|
+
newCurrency = (value.to_i*0.84)
|
13
|
+
elsif name == "INR" #Euro to Indian Rupees
|
14
|
+
newCurrency = (value.to_i*85.40)
|
15
|
+
elsif name == "AUD" #Euro to Australian Dollar
|
16
|
+
newCurrency = (value.to_i*1.54)
|
17
|
+
elsif name == "CAD" #Euro to Canadian Dollar
|
18
|
+
newCurrency = (value.to_i*1.46)
|
19
|
+
elsif name == "CNY" #Euro to Chinies Yuan
|
20
|
+
newCurrency = (value.to_i*1.54)
|
21
|
+
elsif name == "CHF" #Euro to Swiss Fanc
|
22
|
+
newCurrency = (value.to_i*1.22)
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
return newCurrency
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
end #End Module
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: convertcurrency
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- pankb
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: A simple gem
|
15
|
+
email: pbhamare@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/convertcurrency.rb
|
21
|
+
homepage: http://rubygems.org/gems/convertcurrency
|
22
|
+
licenses: []
|
23
|
+
post_install_message:
|
24
|
+
rdoc_options: []
|
25
|
+
require_paths:
|
26
|
+
- lib
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 1.8.11
|
42
|
+
signing_key:
|
43
|
+
specification_version: 3
|
44
|
+
summary: Convert the currency!
|
45
|
+
test_files: []
|