object_sugar 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module ObjectSugar
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/object_sugar.rb CHANGED
@@ -83,10 +83,10 @@ module ObjectSugar
83
83
  # => ONE, TWO, THREE
84
84
 
85
85
  def create_pluralized_constant(name)
86
- pluralized = ActiveSupport::Inflector.pluralize( name.to_s ).upcase.to_sym
86
+ pluralized = ActiveSupport::Inflector.pluralize(name.to_s).upcase.to_sym
87
87
  constants = const_get(name.to_s.camelize.to_sym).constants
88
88
 
89
- const_set(pluralized, constants) unless const_defined?(pluralized)
89
+ const_set(pluralized, constants)
90
90
  end
91
91
  end
92
92
  end
@@ -112,8 +112,8 @@ module ObjectSugar
112
112
  [Class, Module].each do |object|
113
113
  object.class_eval do
114
114
  def value_enums(name, *args)
115
- create_enum( name, 1, *args )
116
- create_pluralized_constant( name )
115
+ create_enum(name, 1, *args)
116
+ create_pluralized_constant(name)
117
117
  end
118
118
  end
119
119
  end
@@ -126,8 +126,8 @@ module ObjectSugar
126
126
  [Class, Module].each do |object|
127
127
  object.class_eval do
128
128
  def bitwise_enums(name, *args)
129
- create_enum( name, 2, *args )
130
- create_pluralized_constant( name )
129
+ create_enum(name, 2, *args )
130
+ create_pluralized_constant(name)
131
131
  end
132
132
  end
133
133
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Robert Zotter