rballista 0.0.2 → 0.0.3
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.
- data/lib/rballista.rb +32 -0
- metadata +3 -3
data/lib/rballista.rb
CHANGED
|
@@ -108,3 +108,35 @@ def translate_planet(plan_num)
|
|
|
108
108
|
""
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
|
+
|
|
112
|
+
def full_sign_names
|
|
113
|
+
[ 'Aries', 'Taurus', 'Gemini', 'Cancer',
|
|
114
|
+
'Leo', 'Virgo', 'Libra', 'Scorpio',
|
|
115
|
+
'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Returns a list (array) of the planet names, in order.
|
|
119
|
+
def full_planet_names
|
|
120
|
+
[ 'Sun', 'Moon', 'Mercury', 'Venus', 'Mars',
|
|
121
|
+
'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'Pluto']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def translate_sign_to_short(long_sign)
|
|
125
|
+
if long_sign.downcase == 'capricorn'
|
|
126
|
+
"cp"
|
|
127
|
+
else
|
|
128
|
+
long_sign[0,2].downcase
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Extract the planet sign from the locations, and return the
|
|
133
|
+
# appropriate sign name.
|
|
134
|
+
def get_sign_from_location(locations,
|
|
135
|
+
planet)
|
|
136
|
+
unless planet >= 1 and planet <= 10
|
|
137
|
+
return ""
|
|
138
|
+
end
|
|
139
|
+
pos=(planet-1)*2
|
|
140
|
+
ss=locations[pos,2].to_i
|
|
141
|
+
full_sign_names[ss-1]
|
|
142
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rballista
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Whelan
|
|
@@ -9,7 +9,7 @@ autorequire: rballista
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-01-
|
|
12
|
+
date: 2009-01-07 00:00:00 +02:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
45
45
|
version:
|
|
46
46
|
requirements: []
|
|
47
47
|
|
|
48
|
-
rubyforge_project:
|
|
48
|
+
rubyforge_project: RBallista
|
|
49
49
|
rubygems_version: 1.2.0
|
|
50
50
|
signing_key:
|
|
51
51
|
specification_version: 2
|