funfig 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/funfig/group.rb CHANGED
@@ -177,14 +177,14 @@ module Funfig
177
177
  klass = _prev.is_a?(Class) && Group >= _prev ? _prev : Class.new(Group)
178
178
  _params[name] = klass
179
179
  path = _sub_name(name)
180
- const_set name.capitalize, klass
180
+ const_set name.to_s.gsub(/(^|_)([a-z])/){ $2.upcase }, klass
181
181
 
182
182
  klass.send(:define_singleton_method, :_path) do
183
183
  path
184
184
  end
185
185
  klass.instance_variable_set(:@parent, self)
186
186
 
187
- define_method(name) do |*args, &block|
187
+ define_method(name) do
188
188
  instance_variable_get(vname) ||
189
189
  instance_variable_set(vname, self.class._params[name].new(self))
190
190
  end
@@ -197,7 +197,7 @@ module Funfig
197
197
  _._cache_clear!
198
198
  remove_instance_variable(vname) if instance_variable_defined?(vname)
199
199
  end
200
- klass.class_exec &block
200
+ klass.class_exec(&block)
201
201
  klass
202
202
  end
203
203
 
@@ -223,7 +223,7 @@ module Funfig
223
223
  }
224
224
  end
225
225
 
226
- define_method(name) do |*args|
226
+ define_method(name) do
227
227
  if instance_variable_defined?(vname)
228
228
  instance_variable_get(vname)
229
229
  else
@@ -287,6 +287,7 @@ module Funfig
287
287
  # other_conf = config.clone do
288
288
  # param :other_value do other_default end
289
289
  # end
290
+ #
290
291
  def self.clone(&block)
291
292
  new = super
292
293
  new.class_exec &block if block_given?
@@ -1,3 +1,3 @@
1
1
  module Funfig
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: