object_sugar 0.0.9 → 0.0.10

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 ObjectSugar
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
data/lib/object_sugar.rb CHANGED
@@ -58,8 +58,10 @@ module ObjectSugar
58
58
  klass = const_defined?(const) ? const_get(const) : const_set(name.to_s.camelize.to_sym, Class.new)
59
59
  klass.extend ObjectSugar::InstanceMethods
60
60
 
61
+ offset = klass.constants.size
62
+
61
63
  args.flatten.each_with_index { |const, index|
62
- value = (factor == 1) ? (factor * index) : (factor.power!( index ))
64
+ value = (factor == 1) ? (factor * (index + offset)) : (factor.power!(index + offset))
63
65
 
64
66
  klass.const_set(const.to_s.underscore.upcase, value.to_i)
65
67
  }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 9
9
- version: 0.0.9
8
+ - 10
9
+ version: 0.0.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Robert Zotter