nakajima-fixjour 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. data/lib/fixjour/builders.rb +9 -0
  2. metadata +1 -1
@@ -55,6 +55,7 @@ module Fixjour
55
55
  def define_new(name, &block)
56
56
  define_method("new_#{name}") do |*args|
57
57
  overrides = args.first || { }
58
+ overrides.extend(OverrideProcessing)
58
59
  result = block.bind(self).call(overrides)
59
60
  result
60
61
  end
@@ -93,5 +94,13 @@ module Fixjour
93
94
  klass.new
94
95
  end
95
96
  end
97
+
98
+ module OverrideProcessing
99
+ def process(key)
100
+ if value = delete(key)
101
+ yield value
102
+ end
103
+ end
104
+ end
96
105
  end
97
106
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nakajima-fixjour
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Nakajima