new_operators 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.
@@ -1,3 +1,3 @@
1
1
  module NewOperators
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/new_operators.rb CHANGED
@@ -1,9 +1,6 @@
1
1
  module NewOperators
2
- def self.included(base)
3
- base.extend ClassMethods
4
- end
5
-
6
- def ^(x)
2
+
3
+ def +(x)
7
4
  product = x
8
5
  x.times do
9
6
  product = product * self
@@ -11,11 +8,10 @@ module NewOperators
11
8
  return product
12
9
  end
13
10
 
14
- module ClassMethods
15
- ## class methods would go here
16
- end
17
11
  end
18
12
 
19
13
  class Fixnum
20
14
  include NewOperators
21
15
  end
16
+
17
+ p 3^3
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: new_operators
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Charlie McElfresh
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-09 00:00:00 Z
13
+ date: 2011-06-10 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Creates a new exponent operator ^, meaning "to the power of", where, for example, 3^3=81